CLOUD SERVICE · AWS

AWS CodeConnections - AWS CodeConnections provides managed connections between AWS developer services and supported external Git repositories.

AWS CodeConnections lets services such as AWS CodePipeline and AWS CodeBuild access repositories hosted by supported providers, including GitHub, GitLab, and Bitbucket Cloud. It manages the connection and authorization relationship, supports supported self-managed provider installations through host resources, and supplies repository synchronization capabilities for supported AWS workflows.

Cloud Services Hub →

What is AWS CodeConnections

Read the extensive description

AWS CodeConnections is the connection layer between supported Git providers and AWS services that consume repository content or repository events. Instead of placing a developer's personal access token directly into each delivery workflow, engineers create a connection, authorize access at the repository provider, and give an AWS service permission to use that connection. The connection is represented by an Amazon Resource Name, or ARN, which consuming services reference in their configuration.

A connection has both AWS-side configuration and provider-side authorization. Creating the AWS resource alone does not necessarily make it usable: connections created through an API or infrastructure-as-code workflow typically remain pending until an administrator completes the provider authorization process. For GitHub, this involves authorizing the appropriate GitHub App installation and repository access. Treat authorization completion and verification of the available connection status as explicit deployment prerequisites rather than assuming that successful resource creation means the integration is ready.

In a common delivery architecture, AWS CodePipeline uses a connection-backed source action to obtain a selected repository and branch. Repository events can initiate pipeline executions, while source action configuration determines how repository content is passed to downstream actions. AWS CodeBuild can also use supported connections for source access. Engineers should distinguish a connection's provider permissions from the AWS IAM permissions granted to the consuming service: both must allow the intended operation.

For supported self-managed providers, CodeConnections uses a host resource to represent the provider installation. Depending on the provider and deployment, host configuration can include VPC connectivity, security groups, subnets, and certificate information. Validate DNS resolution, network reachability, and provider-specific prerequisites before troubleshooting the pipeline itself. Support differs by provider, AWS Region, and consuming service, so a provider supported by CodeConnections is not automatically supported in every downstream workflow.

CodeConnections also supports repository links and synchronization configurations for supported Git synchronization scenarios. For example, AWS CloudFormation Git sync can monitor repository-managed deployment files and templates and use changes to update a stack. These resources describe the repository relationship and synchronization target; they are separate from the connection that supplies authorization.

Operationally, apply least-privilege IAM permissions to connection administration and use, restrict provider installations to necessary repositories, and record administrative API activity with AWS CloudTrail. When diagnosing failures, check connection status, provider installation permissions, repository and branch identifiers, consuming-service role permissions, and any host networking requirements. AWS CodeConnections was previously named AWS CodeStar Connections, so older resource names, ARNs, policy examples, and integration identifiers may retain the earlier terminology. Preserve the correct identifiers for existing resources rather than assuming a rename requires resource replacement.

Key AWS CodeConnections Features

Managed repository connections

Create reusable connection resources for supported Git providers instead of configuring separate repository credentials in every consuming workflow. AWS services reference the connection ARN to request authorized repository access.

Provider-side authorization

Connect AWS resources to provider installations or authorization flows with explicitly granted repository access. Complete the provider authorization step and confirm that the connection is available before enabling dependent workflows.

CodePipeline source integration

Use a connection-backed source action to retrieve repository content for a delivery pipeline. Configure repository, branch, output format, and supported trigger settings in CodePipeline rather than treating these as properties of the connection itself.

CodeBuild source access

Use supported CodeConnections integrations to authorize CodeBuild access to external source repositories. Grant the build service role the required connection permissions and configure build triggers separately where supported.

Self-managed provider hosts

Represent supported self-managed Git provider installations with host resources. Configure the network connectivity and certificate settings required for AWS to reach the installation.

Repository synchronization resources

Repository links and synchronization configurations connect repository content to supported AWS synchronization workflows. Use these resources for scenarios such as CloudFormation Git sync, where repository changes drive infrastructure updates.

IAM-controlled administration and use

Separate permissions to create or manage connections from permissions to use an existing connection. Scope consuming-service permissions to the required connection resources and follow the relevant integration's IAM requirements.

Administrative audit visibility

Use AWS CloudTrail to investigate supported CodeConnections API activity, including connection and host administration. Combine these records with consuming-service logs and provider audit information when diagnosing access changes.

AWS CodeConnections Use Cases

External Git source for continuous delivery

Connect a GitHub, GitLab, or Bitbucket Cloud repository to a supported CodePipeline source action. For example, start a build-and-deploy pipeline when changes arrive on the configured application branch.

Build projects with managed repository authorization

Authorize CodeBuild source access through a supported connection rather than distributing individual developer credentials. Use separate build roles and narrowly scoped provider repository permissions for different applications.

Infrastructure changes driven by Git

Use CloudFormation Git sync with a supported provider to manage stack deployment inputs and templates from a repository. Review infrastructure changes through pull requests before merging them into the branch watched by the synchronization configuration.

Delivery from self-managed Git installations

Connect a supported GitHub Enterprise Server or GitLab self-managed installation to compatible AWS delivery services. Establish the required host resource and network path before wiring the connection into production pipelines.

Controlled repository onboarding

Let platform administrators manage provider authorization while application teams receive permission to use approved connections. This separates repository integration administration from routine pipeline and build configuration.

AWS CodeConnections pricing models

Associated service and infrastructure charges

Budget for services such as CodePipeline, CodeBuild, artifact storage, and deployed resources according to their own pricing. Provider subscriptions and any chargeable networking components used to reach self-managed installations are also separate costs.

No additional CodeConnections service charge

AWS CodeConnections has no additional charge for creating and using connections. Charges for the AWS services that consume those connections remain separate.

Services AWS CodeConnections integrates with

<p>A typical delivery architecture uses CodeConnections for repository authorization, CodePipeline for orchestration, and CodeBuild for compilation and testing. The pipeline source action references a connection ARN and selects the repository and branch. It can deliver a source artifact to downstream stages or, for supported configurations, provide full-clone information that CodeBuild uses to access Git history. The IAM roles involved must have the permissions required for their particular source mode.</p><p>For infrastructure workflows, CloudFormation Git sync uses a connection together with repository linking and synchronization configuration. Teams keep templates and deployment inputs in Git, review changes through pull requests, and let the configured synchronization workflow update the target stack. Connection authorization, synchronization permissions, and CloudFormation deployment permissions are distinct concerns that should be validated separately.</p><p>Self-managed provider architectures add host configuration and, where required, VPC connectivity. Diagnose network and certificate issues independently of repository permissions. Across these patterns, IAM limits administrative and runtime access, while CloudTrail provides administrative audit evidence. Combine AWS audit records with build logs, pipeline execution details, and provider audit events to troubleshoot failures across the integration boundary.</p>

AWS CloudFormation image AWS CloudFormation

CloudFormation Git sync uses CodeConnections to access supported repositories containing stack templates and deployment configuration. For example, merging an approved change to a watched branch can cause a stack update using repository-managed inputs. CloudFormation can also provision connection resources, but newly created connections generally require provider authorization before use.

Open AWS CloudFormation →
AWS CloudTrail image AWS CloudTrail

CloudTrail records supported CodeConnections API activity for auditing and investigation. For example, inspect administrative events when a previously working repository integration fails after an authorization or configuration change. Correlate these events with pipeline execution details and provider-side audit records rather than expecting CloudTrail to contain complete Git operation logs.

Open AWS CloudTrail →
Virtual private cloud VPC_32 image Amazon VPC

Supported self-managed provider hosts can use VPC configuration to reach repository installations on private networks. For example, configure appropriate subnets and security groups for a privately reachable GitHub Enterprise Server host. Validate routing, DNS, TLS trust, and provider-specific connectivity requirements before enabling dependent source actions.

Open Amazon VPC →
AWS CodeBuild image AWS CodeBuild

CodeBuild supports CodeConnections-based source authorization for supported repository providers. For example, a build project can use an authorized GitLab connection to retrieve application source before running tests. When using CodePipeline's full-clone source output, the downstream CodeBuild role also needs the appropriate connection permissions to access the repository.

Open AWS CodeBuild →
AWS CodePipeline image AWS CodePipeline

CodePipeline uses CodeConnections through its connection-backed source action, whose action provider identifier retains the name CodeStarSourceConnection. For example, configure a GitHub repository and branch as the source, then pass the resulting source artifact to a build stage. Grant the pipeline service role permission to use the connection and configure supported event triggers in the pipeline.

Open AWS CodePipeline →