AWS::GreengrassV2::Deployment - Amazon CloudFormation
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).


Creates a continuous deployment for a target, which is a Amazon 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, Amazon 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. Amazon 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 Amazon 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 Amazon 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: Object of ComponentDeploymentSpecification

Update requires: Replacement


The name of the deployment.

Required: No

Type: String

Minimum: 1

Maximum: 256

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

Pattern: arn:[^:]*:iot:[^:]*:[0-9]+:thinggroup/.+

Update requires: Replacement


Application-specific metadata to attach to the deployment. You can use tags in IAM policies to control access to Amazon IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see Tag your Amazon IoT Greengrass Version 2 resources in the Amazon 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 Amazon CloudFormation templates.

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

Required: No

Type: Object of String

Pattern: .*

Maximum: 256

Update requires: No interruption


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

Required: Yes

Type: String

Pattern: arn:[^:]*:iot:[^:]*:[0-9]+:(thing|thinggroup)/.+

Update requires: Replacement

Return values


When you pass the logical ID of this resource to the intrinsic Ref function, Ref returns the DeploymentId.

For more information about using the Ref function, see Ref.


The Fn::GetAtt intrinsic 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::GetAtt intrinsic function, see Fn::GetAtt.


The ID of the deployment.