Add an AWS CloudFormation Template


Add an AWS CloudFormation Template

You can create an AWS CloudFormation template within Kion. When creating CloudFormation templates, keep the following best practices in mind.

  • Include metadata to provide information about the template.
  • Use a ParameterGroup with a label to make field names easier to identify and more descriptive.
  • Include a description for the AWSAccount parameter.
  • Use the Fn:Sub function for the AssumeRolePolicyDocument principal to easily replace AWS variables and template parameters.
  • Use the AWS::Partition variable to allow the template to be used in any of the AWS partitions, like Commercial or GovCloud.
  • Use the Sid field in the PolicyDocument to help describe the level of access the policy statement provides.

There is a Template Parameters field when you add or edit a template in Kion that allows you to pass in parameters without making any changes to your template.

You can also click Pre-fill Parameters to easily fill in the parameter values.

For detailed examples of AWS CloudFormation templates, see Sample AWS CloudFormation Templates.

To add an AWS CloudFormation template:

  1. Navigate to Cloud Management > AWS CloudFormation Templates.
  2. Click Add New
  3. Enter a name to identify the template. This field must be unique among your AWS CloudFormation templates.
  4. (Optional) Enter a Description of the template.
  5. (Optional) If you want to download an AWS CloudFormation template, enter a URL and click Fetch Template.
  6. Select either JSON or YAML as your template format.
  7. Enter a valid AWS CloudFormation template, and click Format to align the braces.

ClosedSample AWS CloudFormation template

  1. If you have template parameters that are required for the template, enter them in the Template Parameters field or click the Pre-fill Parameters button to pre-fill the values.

ClosedSample set of parameters

  1. Select the regions where the template will be applied.
  2. Enter any SNS ARNs you would like attached to your template. This allows you to send a notification via SNS when the template is deployed. For more information, see Amazon's SNS documentation.
  3. Select if you would like to enable Termination Protection on this template. This prevents the CloudFormation stack from being deleted from an account, even if the cloud rule that applied the template is removed from the project in Kion. This option does not prevent modifying the stack, only deleting.
  4. Select at least one user or user group to own this template.
  5. (Optional) Click + Add Key/Value Pair to add tags to this template. These tags will be applied to all supported resources in your stack.
  6. Click Create Template.

What Next?