Authoring templates and creating bundles for AWS Proton
AWS Proton provisions resources for you based on infrastructure as code (IaC) files. You describe infrastructure in reusable IaC files. To make the files reusable for different environments and applications, you author them as templates, define input parameters, and use these parameters in IaC definitions. When you later create a provisioning resource (environment, service instance, or component), AWS Proton uses a rendering engine, which combines input values with a template to create an IaC file that is ready to provision.
Administrators author most templates as template bundles, and then upload and register them into AWS Proton. The remainder of this page discusses these AWS Proton template bundles. Directly defined components are an exception—developers create them and provide IaC template files directly. For more information about components, see AWS Proton components.
Topics
Template bundles
As an administrator, you create and register templates with AWS Proton. You use these templates to create environments and services. When you create a service, AWS Proton provisions and deploys service instances to selected environments. For more information, see AWS Proton for platform teams.
To create and register a template in AWS Proton, you upload a template bundle that contains the infrastructure as code (IaC) files that AWS Proton needs to provision and environment or service.
A template bundle contains the following:
-
An Infrastructure as code (IaC) file with a manifest YAML file that lists the IaC file.
-
A schema YAML file for your IaC file input parameter definitions.
A CloudFormation environment template bundle contains one IaC file.
A CloudFormation service template bundle contains one IaC file for service instance definitions and another optional IaC file for a pipeline definition.
Terraform environment and service template bundles can contain multiple IaC files each.
AWS Proton requires an input parameter schema file. When you use AWS CloudFormation to create your IaC files, you use Jinja
The following diagram shows an example of steps that you can take to create a template for AWS Proton.
Identify input parameters.
Create a schema file to define your input parameters.
Create IaC files that reference your input parameters. You can reference environment IaC file outputs as inputs for your service IaC files.
Register a template version with AWS Proton and upload your template bundle.