AWS::GreengrassV2::Deployment - AWS CloudFormation


Creates a continuous deployment for a target, which is a AWS IoT Greengrass core device or group of core devices. When you add a new core device to a group of core devices that has a deployment, AWS IoT Greengrass deploys that group's deployment to the new device.

You can define one deployment for each target. When you create a new deployment for a target that has an existing deployment, you replace the previous deployment. AWS IoT Greengrass applies the new deployment to the target devices.

You can only add, update, or delete up to 10 deployments at a time to a single target.

Every deployment has a revision number that indicates how many deployment revisions you define for a target. Use this operation to create a new revision of an existing deployment. This operation returns the revision number of the new deployment when you create it.

For more information, see the Create deployments in the AWS IoT Greengrass V2 Developer Guide.


Deployment resources are deleted when you delete stacks. To keep the deployments in a stack, you must specify "DeletionPolicy": "Retain" on each deployment resource in the stack template that you want to keep. For more information, see DeletionPolicy.

You can only delete up to 10 deployment resources at a time. If you delete more than 10 resources, you receive an error.


To declare this entity in your AWS CloudFormation template, use the following syntax:


{ "Type" : "AWS::GreengrassV2::Deployment", "Properties" : { "Components" : {Key: Value, ...}, "DeploymentName" : String, "DeploymentPolicies" : DeploymentPolicies, "IotJobConfiguration" : DeploymentIoTJobConfiguration, "ParentTargetArn" : String, "Tags" : {Key: Value, ...}, "TargetArn" : String } }


Type: AWS::GreengrassV2::Deployment Properties: Components: Key: Value DeploymentName: String DeploymentPolicies: DeploymentPolicies IotJobConfiguration: DeploymentIoTJobConfiguration ParentTargetArn: String Tags: Key: Value TargetArn: String



The components to deploy. This is a dictionary, where each key is the name of a component, and each key's value is the version and configuration to deploy for that component.

Required: No

Type: Map of ComponentDeploymentSpecification

Update requires: Replacement


The name of the deployment.

Required: No

Type: String

Update requires: Replacement


The deployment policies for the deployment. These policies define how the deployment updates components and handles failure.

Required: No

Type: DeploymentPolicies

Update requires: Replacement


The job configuration for the deployment configuration. The job configuration specifies the rollout, timeout, and stop configurations for the deployment configuration.

Required: No

Type: DeploymentIoTJobConfiguration

Update requires: Replacement


The parent deployment's ARN for a subdeployment.

Required: No

Type: String

Update requires: Replacement


Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your AWS IoT Greengrass Version 2 resources in the AWS IoT Greengrass V2 Developer Guide.

This Json property type is processed as a map of key-value pairs. It uses the following format, which is different from most Tags implementations in AWS CloudFormation templates.

"Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" }

Required: No

Type: Map of String

Update requires: No interruption


The ARN of the target AWS IoT thing or thing group.

Required: Yes

Type: String

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Reffunction, Refreturns the DeploymentId.

For more information about using the Reffunction, see Ref.


The Fn::GetAttintrinsic function returns a value for a specified attribute of this type. The following are the available attributes and sample return values.

For more information about using the Fn::GetAttintrinsic function, see Fn::GetAtt.


The ID of the deployment.