AWS CloudFormation
User Guide (Version )

AWS::S3::Bucket ObjectLockConfiguration

Places an Object Lock configuration on the specified bucket. The rule specified in the Object Lock configuration will be applied by default to every new object placed in the specified bucket.

Note

DefaultRetention requires either Days or Years. You can't specify both at the same time.

Related Resources

Syntax

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

JSON

{ "ObjectLockEnabled" : String, "Rule" : ObjectLockRule }

Properties

ObjectLockEnabled

Indicates whether this bucket has an Object Lock configuration enabled.

Required: No

Type: String

Allowed Values: Enabled

Update requires: No interruption

Rule

The Object Lock rule in place for the specified object.

Required: No

Type: ObjectLockRule

Update requires: No interruption

On this page: