View a markdown version of this page

Creating automation rules with Amazon CloudFormation - Amazon Compute Optimizer
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Creating automation rules with Amazon CloudFormation

Amazon Compute Optimizer integrates with Amazon CloudFormation, enabling you to define and deploy automation rules with infrastructure-as-code. You can create a template that describes the automation rules you want, and Amazon CloudFormation provisions and configures those rules for you. When you use Amazon CloudFormation, you can reuse your template to set up your automation rules consistently and repeatedly across multiple Amazon Web Services accounts.

Compute Optimizer and Amazon CloudFormation templates

To provision and configure automation rules, you must understand how Amazon CloudFormation templates work. Templates are text files in JSON or YAML format. These templates describe the resources that you want to provision in your Amazon CloudFormation stacks.

If you're unfamiliar with JSON or YAML, you can use Amazon CloudFormation Designer to help you get started with Amazon CloudFormation templates. For more information, see What is Amazon CloudFormation Designer? in the Amazon CloudFormation User Guide.

You can create Amazon CloudFormation templates for the following types of automation rules:

  • Account rules that apply recommended actions only to your account

  • Organization rules that centrally apply recommended actions across member accounts

For more information, including examples of JSON and YAML templates for automation rules, see AWS::ComputeOptimizer::AutomationRule in the Amazon CloudFormation User Guide.

Learn more about Amazon CloudFormation

To learn more about Amazon CloudFormation, see the following resources: