You can register and publish environment and service templates with AWS Proton, as described in the following sections.
You can create a new version of a template with the console or AWS CLI.
Alternatively, you can use the console or AWS CLI to create a template and configure a configure a template sync for it. This configuration lets AWS Proton sync from template bundles located in registered git repositories that you have defined. Whenever a commit is pushed to your repository that changes one of your template bundles, a new minor or major version of your template is created, if the version doesn’t already exist. To learn more about template sync configuration prerequisites and requirements, see Template sync configurations.
Register and publish environment templates
You can register and publish the following types of environment templates.
-
Register and publish a standard environment template that AWS Proton uses to deploy and manage environment infrastructure.
-
Register and publish a customer managed environment template that AWS Proton uses to connect to your existing provisioned infrastructure that you manage. AWS Proton doesn't manage your existing provisioned infrastructure.
Important
As an administrator, ensure that your provisioned and managed infrastructure and all output parameters are compatible with associated customer managed environment templates. AWS Proton can't account for changes on your behalf because these changes aren't visible to AWS Proton. Inconsistencies result in failures.
You can use the console or the AWS CLI to register and publish an environment template.
Use the console to register and publish a new environment template.
-
In the AWS Proton console
, choose Environment templates. -
Choose Create environment template.
-
In the Create environment template page, in the Template options section, choose one of the two available template options.
-
Create a template for provisioning new environments.
-
Create a template to use provisioned infrastructure that you manage.
-
-
If you chose Create a template for provisioning new environments, in the Template bundle source section, choose one of the three available template bundle source options. To learn more about requirements and prerequisites for syncing templates, see Template sync configurations.
-
Use one of our sample template bundles.
-
Use your own template bundle.
-
-
Provide a path to a template bundle.
-
If you chose Use one of our sample template bundles:
In the Sample template bundle section, select a sample template bundle.
-
If you chose Sync templates from Git, in the Source code section:
-
Select the repository for your template sync configuration.
-
Enter the name of the repository branch to sync from.
-
(Optional) Enter name of a directory to limit the search for your template bundle.
-
-
Otherwise, in the S3 bundle location section, provide a path to your template bundle.
-
-
In the Template details section.
-
Enter a Template name.
-
(Optional) Enter a Template display name.
-
(Optional) Enter a Template description for the environment template.
-
-
(Optional) Check the check box for Customize encryption settings (advanced) in the Encryption settings section to provide your own encryption key.
-
(Optional) In the Tags section, choose Add new tag and enter a key and value to create a customer managed tag.
-
Choose Create Environment template.
You're now on a new page that displays the status and details for your new environment template. These details include a list of AWS and customer managed tags. AWS Proton automatically generates AWS managed tags for you when you create AWS Proton resources. For more information, see AWS Proton resources and tagging.
-
The status of a new environment template status starts in the Draft state. You and others with
proton:CreateEnvironment
permissions can view and access it. Follow the next step to make the template available to others. -
In the Template versions section, choose the radio button to the left of the minor version of the template you just created (1.0). As an alternative, you can choose Publish in the info alert and skip the next step.
-
In the Template versions section, choose Publish.
-
The template status changes to Published. Because it's the latest version of the template, it's the Recommended version.
-
In the navigation pane, select Environment templates to view a list of your environment templates and details.
Use the console to register new major and minor versions of an environment template.
For more information, see Versioned templates.
-
In the AWS Proton console
, choose Environment Templates. -
In the list of environment templates, choose the name of the environment template that you want to create a major or minor version for.
-
In the environment template detail view, choose Create new version in the Template versions section.
-
In the Create a new environment template version page, in the Template bundle source section, choose one of the two available template bundle source options.
-
Use one of our sample template bundles.
-
Use your own template bundle.
-
-
Provide a path to the selected template bundle.
-
If you chose Use one of our sample template bundles, in the Sample template bundle section, select a sample template bundle.
-
If you chose Use your own template bundle, in the S3 bundle location section, choose the path to your template bundle.
-
-
In the Template details section.
-
(Optional) Enter a Template display name.
-
(Optional) Enter a Template description for the service template.
-
-
In the Template details section, choose one of the following options.
-
To create a minor version, keep the check box Check to create a new major version empty.
-
To create a major version, check the check box Check to create a new major version.
-
-
Continue through the console steps to create the new minor or major version and choose Create new version.
Register and publish service templates
When you create a service template version, you specify a list of compatible environment templates. That way, when developers select a service template, they have options for which environment to deploy their service to.
Before creating a service from a service template or before publishing a service template, confirm that environments are deployed from the listed compatible environment templates.
You can't update a service to the new major version if it's deployed to an environment that was built from a removed compatible environment template.
To add or remove compatible environment templates for a service template version, you create a new major version of it.
You can use the console or the AWS CLI to register and publish a service template.
Use the console to register and publish a new service template.
-
In the AWS Proton console
, choose Service templates. -
Choose Create service template.
-
In the Create service template page, in the Template bundle source section, choose one of the available template options.
-
Use your own template bundle.
-
Sync templates from Git.
-
-
Provide a path to a template bundle.
-
If you chose Sync templates from Git, in the Source code repository section:
-
Select the repository for your template sync configuration.
-
Enter the name of the repository branch to sync from.
-
(Optional) Enter name of a directory to limit the search for your template bundle.
-
-
Otherwise, in the S3 bundle location section, provide a path to your template bundle.
-
-
In the Template details section.
-
Enter a Template name.
-
(Optional) Enter a Template display name.
-
(Optional) Enter a Template description for the service template.
-
-
In the Compatible environment templates section, choose from a list of compatible environment templates.
-
(Optional) In the Encryption settings section, choose Customize encryption settings (advanced) to provide your own encryption key.
-
(Optional) In the Pipeline section:
If you aren't including a service pipeline definition in your service template, uncheck the Pipeline - optional check box at the bottom of the page. You can't change this after the service template is created. For more information, see Template bundles.
-
(Optional) In the Supported component sources section, for Component sources, choose Directly defined to enable attachment of directly defined components to your service instances.
-
(Optional) In the Tags section, choose Add new tag and enter a key and value to create a customer managed tag.
-
Choose Create a service template.
You're now on a new page that displays the status and details for your new service template. These details include a list of AWS and customer managed tags. AWS Proton automatically generates AWS managed tags for you when you create AWS Proton resources. For more information, see AWS Proton resources and tagging.
-
The status of a new service template status starts in the Draft state. You and others with
proton:CreateService
permissions can view and access it. Follow the next step to make the template available to others. -
In the Template versions section, choose the radio button to the left of the minor version of the template you just created (1.0). As an alternative, you can choose Publish in the info alert and skip the next step.
-
In the Template versions section, choose Publish.
-
The template status changes to Published. Because it's the latest version of the template, it's the Recommended version.
-
In the navigation pane, select Service templates to view a list of your service templates and details.
Use the console to register new major and minor versions of a service template.
For more information, see Versioned templates.
-
In the AWS Proton console
, choose Service Templates. -
In the list of service templates, choose the name of the service template that you want to create a major or minor version for.
-
In the service template detail view, choose Create new version in the Template versions section.
-
In the Create a new service template version page, in the Bundle source section, select Use your own template bundle.
-
In the S3 bundle location section, choose the path to your template bundle.
-
In the Template details section.
-
(Optional) Enter a Template display name.
-
(Optional) Enter a Template description for the service template.
-
-
In the Template details section, choose one of the following options.
-
To create a minor version, keep the check box Check to create a new major version empty.
-
To create a major version, check the check box Check to create a new major version.
-
-
Continue through the console steps to create the new minor or major version and choose Create new version.