AWS::DLM::LifecyclePolicy - AWS CloudFormation


Specifies a lifecycle policy, which is used to automate operations on Amazon EBS resources.

The properties are required when you add a lifecycle policy and optional when you update a lifecycle policy.


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


{ "Type" : "AWS::DLM::LifecyclePolicy", "Properties" : { "Description" : String, "ExecutionRoleArn" : String, "PolicyDetails" : PolicyDetails, "State" : String, "Tags" : [ Tag, ... ] } }


Type: AWS::DLM::LifecyclePolicy Properties: Description: String ExecutionRoleArn: String PolicyDetails: PolicyDetails State: String Tags: - Tag



A description of the lifecycle policy. The characters ^[0-9A-Za-z _-]+$ are supported.

Required: Conditional

Type: String

Minimum: 0

Maximum: 500

Pattern: [0-9A-Za-z _-]+

Update requires: No interruption


The Amazon Resource Name (ARN) of the IAM role used to run the operations specified by the lifecycle policy.

Required: Conditional

Type: String

Minimum: 0

Maximum: 2048

Pattern: arn:aws(-[a-z]{1,3}){0,2}:iam::\d+:role/.*

Update requires: No interruption


The configuration details of the lifecycle policy.

Required: Conditional

Type: PolicyDetails

Update requires: No interruption


The activation state of the lifecycle policy.

Required: Conditional

Type: String

Allowed values: DISABLED | ENABLED | ERROR

Update requires: No interruption


The tags to apply to the lifecycle policy during creation.

Required: No

Type: List of Tag

Update requires: No interruption

Return values


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

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 Amazon Resource Name (ARN) of the lifecycle policy.


Creating a Lifecycle Policy

The following example demonstrates how to create a basic snapshot lifecycle policy with a cross-Region copy rule.


{ "Description": "Basic LifecyclePolicy", "Resources": { "BasicLifecyclePolicy": { "Type": "AWS::DLM::LifecyclePolicy", "Properties": { "Description": "Lifecycle Policy using CloudFormation", "State": "ENABLED", "ExecutionRoleArn": "arn:aws:iam::123456789012:role/service-role/AWSDataLifecycleManagerDefaultRole", "PolicyDetails": { "ResourceTypes": [ "VOLUME" ], "TargetTags": [{ "Key": "costcenter", "Value": "115" }], "Schedules": [{ "Name": "Daily Snapshots", "TagsToAdd": [{ "Key": "type", "Value": "DailySnapshot" }], "CreateRule": { "Interval": 12, "IntervalUnit": "HOURS", "Times": [ "13:00" ] }, "RetainRule": { "Count": 1 }, "CopyTags": true, "CrossRegionCopyRules": [{ "Encrypted": false, "Target": "us-east-1" }] }] } } } } }


Description: Basic LifecyclePolicy Resources: BasicLifecyclePolicy: Type: AWS::DLM::LifecyclePolicy Properties: Description: Lifecycle Policy using CloudFormation State: ENABLED ExecutionRoleArn: arn:aws:iam::123456789012:role/service-role/AWSDataLifecycleManagerDefaultRole PolicyDetails: ResourceTypes: - VOLUME TargetTags: - Key: costcenter Value: '115' Schedules: - Name: Daily Snapshots TagsToAdd: - Key: type Value: DailySnapshot CreateRule: Interval: 12 IntervalUnit: HOURS Times: - '13:00' RetainRule: Count: 1 CopyTags: true CrossRegionCopyRules: - Encrypted: false Target: us-east-1

See also