Creating environments for your application in AWS AppConfig
For each AWS 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, AWS 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 AWS AppConfig to roll back a configuration in response to a CloudWatch alarm, then you must configure an AWS Identity and Access Management (IAM) role with permissions to enable AWS AppConfig to respond to CloudWatch alarms. You choose this role in the following procedure. For more information, see (Optional) Configure permissions for rollback based on CloudWatch alarms.
Topics
Creating an AWS AppConfig environment (console)
Use the following procedure to create an AWS AppConfig environment by using the AWS Systems Manager console.
To create an environment
Open the AWS Systems Manager console at https://console.aws.amazon.com/systems-manager/appconfig/
. -
On the Applications tab, choose the application you created in Creating a namespace for your application in AWS AppConfig and then choose View details.
-
On the Environments tab, choose Create environment.
-
For Name, enter a name for the environment.
-
For Description, enter information about the environment.
-
In the IAM role list, choose the IAM role with permission to roll back a configuration when an alarm is triggered.
-
In the CloudWatch alarms list, choose one or more alarms to monitor. AWS AppConfig rolls back your configuration deployment if one of these alarms goes into an alarm state.
-
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.
AWS AppConfig creates the environment and then displays the Environment details page. Proceed to Creating a configuration profile in AWS AppConfig.
Creating an AWS AppConfig environment (command line)
The following procedure describes how to use the AWS CLI (on Linux or Windows) or AWS Tools for PowerShell to create an AWS AppConfig environment.
To create an environment step by step
-
Open the AWS CLI.
-
Run the following command to create an environment.
The system returns information like the following.
Proceed to Creating a configuration profile in AWS AppConfig.