AWS::AppConfig::Deployment
The AWS::AppConfig::Deployment resource starts a deployment. Starting a
deployment in Amazon AppConfig calls the StartDeployment API action. This
call includes the IDs of the Amazon AppConfig application, the environment, the
configuration profile, and (optionally) the configuration data version to deploy. The call
also includes the ID of the deployment strategy to use, which determines how the configuration
data is deployed.
Amazon AppConfig monitors the distribution to all hosts and reports status. If a distribution fails, then Amazon AppConfig rolls back the configuration.
Amazon 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 Amazon AppConfig in the Amazon AppConfig User Guide.
Syntax
To declare this entity in your Amazon CloudFormation template, use the following syntax:
JSON
{ "Type" : "AWS::AppConfig::Deployment", "Properties" : { "ApplicationId" :String, "ConfigurationProfileId" :String, "ConfigurationVersion" :String, "DeploymentStrategyId" :String, "Description" :String, "EnvironmentId" :String, "KmsKeyIdentifier" :String, "Tags" :[ Tags, ... ]} }
YAML
Type: AWS::AppConfig::Deployment Properties: ApplicationId:StringConfigurationProfileId:StringConfigurationVersion:StringDeploymentStrategyId:StringDescription:StringEnvironmentId:StringKmsKeyIdentifier:StringTags:- Tags
Properties
ApplicationId-
The application ID.
Required: Yes
Type: String
Pattern:
[a-z0-9]{4,7}Update requires: Replacement
ConfigurationProfileId-
The configuration profile ID.
Required: Yes
Type: String
Pattern:
[a-z0-9]{4,7}Update requires: Replacement
ConfigurationVersion-
The configuration version to deploy. If deploying an Amazon AppConfig hosted configuration version, you can specify either the version number or version label. For all other configurations, you must specify the version number.
Required: Yes
Type: String
Minimum:
1Maximum:
1024Update requires: Replacement
DeploymentStrategyId-
The deployment strategy ID.
Required: Yes
Type: String
Pattern:
[a-z0-9]{4,7}Update requires: Replacement
Description-
A description of the deployment.
Required: No
Type: String
Minimum:
0Maximum:
1024Update requires: Replacement
EnvironmentId-
The environment ID.
Required: Yes
Type: String
Pattern:
[a-z0-9]{4,7}Update requires: Replacement
KmsKeyIdentifier-
The Amazon KMS key identifier (key ID, key alias, or key ARN). Amazon AppConfig uses this ID to encrypt the configuration data using a customer managed key.
Required: No
Type: String
Minimum:
1Maximum:
2048Update requires: Replacement
Tags-
Metadata to assign to the deployment. Tags help organize and categorize your Amazon AppConfig resources. Each tag consists of a key and an optional value, both of which you define.
Required: No
Update requires: Replacement
Return values
Ref
Examples
Amazon AppConfig deployment example
The following example creates an Amazon AppConfig deployment. Starting a deployment in Amazon AppConfig calls the StartDeployment API action. This call includes the IDs of the Amazon AppConfig application, the environment, the configuration profile, and (optionally) the configuration data version to deploy. The call also includes the ID of the deployment strategy to use, which determines how the configuration data is deployed.
Amazon AppConfig monitors the distribution to all hosts and reports status. If a distribution fails, then Amazon AppConfig rolls back the configuration.
JSON
Resources": { "BasicDeployment": { "Type": "AWS::AppConfig::Deployment", "DependsOn": [ "MyTestApplication", "MyTestConfigurationProfile", "MyTestEnvironment", "MyTestDeploymentStrategy" ], "Properties": { "ApplicationId": MyTestApplication, "EnvironmentId": MyTestEnvironment, "DeploymentStrategyId": MyTestDeploymentStrategy, "ConfigurationProfileId": MyTestConfigurationProfile, "ConfigurationVersion": "1", "Description": "My test deployment", "Tags": [ { "Key": "Env", "Value": "test" } ] } } } }
YAML
Resources: BasicDeployment: Type: AWS::AppConfig::Deployment Properties: ApplicationId: !Ref MyTestApplication EnvironmentId: !Ref MyTestEnvironment DeploymentStrategyId: !Ref MyTestDeploymentStrategy ConfigurationProfileId: !Ref MyTestConfigurationProfile ConfigurationVersion: '1' Description: 'My test deployment' Tags: - Key: Env Value: test