AWS::S3::Bucket OwnershipControlsRule - AWS CloudFormation

AWS::S3::Bucket OwnershipControlsRule

Specifies an object ownership rule.

Syntax

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

JSON

{ "ObjectOwnership" : String }

YAML

ObjectOwnership: String

Properties

ObjectOwnership

Specifies an object ownership rule.

Allowed values: ObjectWriter | BucketOwnerPreferred

Required: No

Type: String

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