End of support notice: On October 7, 2026, AWS will end support for AWS Proton. After October
7, 2026, you will no longer be able to access the AWS Proton console or AWS Proton resources. Your deployed infrastructure
will remain intact. For more information, see AWS Proton Service Deprecation and Migration
Guide.
Create a link to your repository
You can create a link to your repository using the console or CLI. When you create a
repository link, AWS Proton creates a service linked
role for you.
- AWS Management Console
-
Create a link to your repository as shown in the following
console steps.
-
In the AWS Proton console, choose
Repositories.
-
Choose Create repository.
-
In the Link new repository page, in the
Repository details section:
-
Choose your repository provider.
-
Choose one of your existing connections. If you don't have one, choose
Add a new CodeStar connection to create a connection, and
then go back to the AWS Proton console, refresh the connection list, and choose your
new connection.
-
Choose from your connected source code repositories.
-
[optional] In the Tags section, choose
Add new tag one or more times, and enter
Key and Value pairs.
-
Choose Create repository.
-
View the detail data for your linked repository.
- AWS CLI
-
Create and register a link to your repository.
Run the following command:
$ aws proton create-repository \
--name myrepos/environments \
--connection-arn "arn:aws:codestar-connections:region-id:123456789012:connection/a1b2c3d4-5678-90ab-cdef-EXAMPLE11111" \
--provider "GITHUB" \
--encryption-key "arn:aws:kms:region-id:123456789012:key/bPxRfiCYEXAMPLEKEY" \
--tags key=mytag1,value=value1 key=mytag2,value=value2
The last two parameters, --encryption-key and
--tags, are optional.
Response:
{
"repository": {
"arn": "arn:aws:proton:region-id:123456789012:repository/github:myrepos/environments",
"connectionArn": "arn:aws:codestar-connections:region-id:123456789012:connection/2ad03b28-a7c4-EXAMPLE11111",
"encryptionKey": "arn:aws:kms:region-id:123456789012:key/bPxRfiCYEXAMPLEKEY",
"name": "myrepos/environments",
"provider": "GITHUB"
}
}
After you create a repository link, you can view a list of AWS and customer
managed tags, as shown in the following example command. AWS Proton automatically
generates AWS managed tags for you. You can also modify and create customer managed
tags using the AWS CLI. For more information, see AWS Proton resources and tagging.
Command:
$ aws proton list-tags-for-resource \
--resource-arn "arn:aws:proton:region-id:123456789012:repository/github:myrepos/environments"