AWS::AppConfig::Environment - AWS CloudFormation

AWS::AppConfig::Environment

The AWS::AppConfig::Environment resource creates an environment, which is a logical deployment group of AWS AppConfig targets, such as applications in a Beta or Production environment. You define one or more environments for each AWS 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.

AWS AppConfig requires that you create resources and deploy a configuration in the following order:

  1. Create an application

  2. Create an environment

  3. Create a configuration profile

  4. Choose a pre-defined deployment strategy or create your own

  5. Deploy the configuration

For more information, see AWS AppConfig in the AWS AppConfig 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" : [ Monitor, ... ], "Name" : String, "Tags" : [ Tag, ... ] } }

YAML

Type: AWS::AppConfig::Environment Properties: ApplicationId: String Description: String Monitors: - Monitor Name: String Tags: - Tag

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

Type: Array of Monitor

Minimum: 0

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

Type: Array of Tag

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.

Fn::GetAtt

EnvironmentId

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 AWS 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

See also