Creating environments for your application in Amazon AppConfig
For each Amazon AppConfig application, you define one or more environments. An environment is a
logical deployment group of AppConfig targets, such as applications in a Beta
or
Production
environment, Amazon Lambda functions, or containers. You can also define
environments for application subcomponents, such as the Web
, Mobile
,
and Back-end
. You can configure Amazon CloudWatch alarms for each environment. The system
monitors alarms during a configuration deployment. If an alarm is triggered, the system rolls
back the configuration.
Before You Begin
If you want to enable Amazon AppConfig to roll back a configuration in response to a CloudWatch alarm, then you must configure an Amazon Identity and Access Management (IAM) role with permissions to enable Amazon AppConfig to respond to CloudWatch alarms. You choose this role in the following procedure. For more information, see (Recommended) Configure permissions for automatic rollback.
Topics
Creating an Amazon AppConfig environment (console)
Use the following procedure to create an Amazon AppConfig environment by using the Amazon Systems Manager console.
To create an environment
Open the Amazon Systems Manager console at https://console.amazonaws.cn/systems-manager/appconfig/
. -
In the navigation pane, choose Applications, and then choose the name of an application to open the details page.
-
Choose the Environments tab, and then choose Create environment.
-
For Name, enter a name for the environment.
-
For Description, enter information about the environment.
-
(Optional) In the Monitors section, choose the IAM role field, and then choose an IAM role with permission to call
cloudwatch:DescribeAlarms
on the metrics you want to monitor for alarms. -
In the CloudWatch alarms list, enter the Amazon Resource Names (ARNs) one or more metrics to monitor. Amazon AppConfig rolls back your configuration deployment if one of these metrics goes into an
ALARM
state. For information about recommended metrics, see Monitoring deployments for automatic rollback -
(Optional) In the Associate extensions section, choose an extension from the list. For more information, see Understanding Amazon AppConfig extensions.
-
(Optional) In the Tags section, enter a key and an optional value. You can specify a maximum of 50 tags for a resource.
-
Choose Create environment.
Amazon AppConfig creates the environment and then displays the Environment details page. Proceed to Creating a configuration profile in Amazon AppConfig.
Creating an Amazon AppConfig environment (command line)
The following procedure describes how to use the Amazon CLI (on Linux or Windows) or Amazon Tools for PowerShell to create an Amazon AppConfig environment.
To create an environment step by step
-
Open the Amazon CLI.
-
Run the following command to create an environment.
The system returns information like the following.
Proceed to Creating a configuration profile in Amazon AppConfig.