Create a service sync configuration
You can create a service sync configuration using the console or AWS CLI.
- AWS Management Console
-
-
On the Choose a service template page, select a template and choose Configure.
-
On the Configure service page, in the Service details section, enter a new Service name.
-
(Optional) Enter a description for the service.
-
In the Application source code repository section, choose Choose a linked Git repository to select a repository you've already linked with AWS Proton. If you don't already have a linked repository, choose Link another Git repository and follow the instructions in Create a link to your repository.
-
For Repository, choose the name of your source code repository from the list.
-
For Branch, choose the name of the repository branch for your source code from the list.
-
(Optional) In the Tags section, choose Add new tag and enter a key and value to create a customer managed tag.
-
Choose Next.
-
On the Configure service instances page, in the Service definition source section, select Sync your service from Git.
-
In the Service definition files section, if you want AWS Proton to create your
proton-ops
file, select I want AWS Proton to create the files. With this option, AWS Proton creates thespec
andproton-ops
file in the locations you specify. Select I am providing my own files to create your own OPS file. -
In the Service definition repository section, choose Choose a linked Git repository to select a repository you've already linked with AWS Proton.
-
For Repository name, choose the name of your source code repository from the list.
-
For
proton-ops
file branch, choose the name of your branch from the list where AWS Proton will put your OPS and spec file. -
In the Service instances section, each field is automatically filled based on the values in the
proton-ops
file. -
Choose Next and review your inputs.
-
Choose Create.
-
- AWS CLI
-
Create a service sync configuration using the AWS CLI
-
Run the following command.
$
aws proton create-service-sync-config \ --resource "
service-arn
" \ --repository-provider "GITHUB
" \ --repository "example/proton-sync-service
" \ --ops-file-branch "main
" \ --proton-ops-file "./configuration/custom-proton-ops.yaml
" (optional)The response is as follows.
{ "serviceSyncConfig": { "branch": "main", "filePath": "./configuration/custom-proton-ops.yaml", "repositoryName": "example/proton-sync-service", "repositoryProvider": "GITHUB", "serviceName": "service name" } }
-