AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::GreengrassV2::Deployment

CfnDeployment

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](https://docs.aws.amazon.com/greengrass/v2/developerguide/create-deployments.html) 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](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html) . > > You can only delete up to 10 deployment resources at a time. If you delete more than 10 resources, you receive an error.

Import

import { CfnDeployment } from 'aws-cdk-lib/aws-greengrassv2';

Or use the module namespace:

import * as greengrassv2 from 'aws-cdk-lib/aws-greengrassv2';
// greengrassv2.CfnDeployment

Properties

Configuration passed to the constructor as CfnDeploymentProps.

targetArnRequired
string

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

componentsOptional
IResolvable | { [key: string]: IResolvable | ComponentDeploymentSpecificationProperty }

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.

deploymentNameOptional
string

The name of the deployment.

deploymentPoliciesOptional
IResolvable | DeploymentPoliciesProperty

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

iotJobConfigurationOptional
IResolvable | DeploymentIoTJobConfigurationProperty

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

parentTargetArnOptional
string

The parent deployment's [ARN](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) for a subdeployment.

tagsOptional
{ [key: string]: string }

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](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) 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 CloudFormation templates. ```json "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value" } ```

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Learn AWS the Practical Way

Our bi-weekly newsletter teaches hands-on AWS fundamentals. No certification fluff - just practical knowledge.

Subscribe to Newsletter

Quick Facts

LevelL1 (CloudFormation)
Moduleaws-greengrassv2
CFN TypeAWS::GreengrassV2::Deployment
Properties7

Related Constructs

External Links