AWS::S3::Bucket OwnershipControls - AWS CloudFormation

AWS::S3::Bucket OwnershipControls

Specifies the container element for object ownership rules.

Syntax

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

JSON

{ "Rules" : [ OwnershipControlsRule, ... ] }

Properties

Rules

Specifies the container element for object ownership rules.

Required: Yes

Type: List of OwnershipControlsRule

Update requires: No interruption

Examples

Object ownership

The following examples show object ownership set to BucketOwnerPreferred.

JSON

{ "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "S3Bucket": { "Type": "AWS::S3::Bucket", "Properties": { "OwnershipControls": { "Rules": [ { "ObjectOwnership": "BucketOwnerPreferred" } ] } } } } }

YAML

AWSTemplateFormatVersion: 2010-09-09 Resources: S3Bucket: Type: 'AWS::S3::Bucket' Properties: OwnershipControls: Rules: - ObjectOwnership: BucketOwnerPreferred