AWS::AppConfig::Environment
The AWS::AppConfig::Environment
resource creates an environment, which is a
logical deployment group of AppConfig targets, such as applications in a Beta
or
Production
environment. You define one or more environments for each AppConfig
application. You can also define environments for application subcomponents such as
the
Web
, Mobile
and Back-end
components for your
application. 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.
AppConfig requires that you create resources and deploy a configuration in the following order:
-
Create an application
-
Create an environment
-
Create a configuration profile
-
Create a deployment strategy
-
Deploy the configuration
For more information, see AWS AppConfig in the AWS Systems Manager User Guide.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::AppConfig::Environment", "Properties" : { "ApplicationId" :
String
, "Description" :String
, "Monitors" :[ Monitors, ... ]
, "Name" :String
, "Tags" :[ Tags, ... ]
} }
YAML
Type: AWS::AppConfig::Environment Properties: ApplicationId:
String
Description:String
Monitors:- Monitors
Name:String
Tags:- Tags
Properties
ApplicationId
-
The application ID.
Required: Yes
Type: String
Pattern:
[a-z0-9]{4,7}
Update requires: Replacement
Description
-
A description of the environment.
Required: No
Type: String
Minimum:
0
Maximum:
1024
Update requires: No interruption
Monitors
-
Amazon CloudWatch alarms to monitor during the deployment process.
Required: No
Maximum:
5
Update requires: No interruption
Name
-
A name for the environment.
Required: Yes
Type: String
Minimum:
1
Maximum:
64
Update requires: No interruption
Tags
-
Metadata to assign to the environment. Tags help organize and categorize your AWS AppConfig resources. Each tag consists of a key and an optional value, both of which you define.
Required: No
Update requires: No interruption
Return values
Ref
When you pass the logical ID of this resource to the intrinsic Ref
function, Ref
returns the environment ID.
Examples
AWS AppConfig Environment Example
The following example creates an AWS AppConfig environment named MyTestEnvironment. An environment is a logical deployment group of AppConfig targets, such as applications in a Beta or Production environment. You can also define environments for application subcomponents such as the Web, Mobile, and Back-end components for your application.
JSON
Resources": { "BasicEnvironment": { "Type": "AWS::AppConfig::Environment", "DependsOn": "DependentApplication", "Properties": { "ApplicationId": null, "Name": "MyTestEnvironment", "Description": "My test environment", "Tags": [ { "Key": "Env", "Value": "test" } ] } } } }
YAML
Resources: BasicEnvironment: Type: AWS::AppConfig::Environment Properties: ApplicationId: !Ref DependentApplication Name: "MyTestEnvironment" Description: "My test environment" Tags: - Key: Env Value: test