AWS Fundamentals Logo
AWS Fundamentals
AWS::S3::Bucket

S3 Bucket

The AWS::S3::Bucket resource creates an Amazon S3 bucket in the same AWS Region where you create the AWS CloudFormation stack. To control how AWS CloudFormation handles the bucket when the stack is deleted, you can set a deletion policy for your bucket. You can choose to *retain* the bucket or to *delete* the bucket. For more information, see [DeletionPolicy Attribute](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html). You can only delete...

Properties

23 configurable properties. Click a row to see details.

Filter:
PropertyTypeFlags
AbacStatus
string
AccelerateConfiguration
AccelerateConfiguration
AccessControl
string
Write-only
AnalyticsConfigurations
Array<AnalyticsConfiguration>
BucketEncryption
BucketEncryption
BucketName
string
Create-only
CorsConfiguration
CorsConfiguration
IntelligentTieringConfigurations
Array<IntelligentTieringConfiguration>
InventoryConfigurations
Array<InventoryConfiguration>
LifecycleConfiguration
LifecycleConfiguration
LoggingConfiguration
LoggingConfiguration
MetadataConfiguration
MetadataConfiguration
MetadataTableConfiguration
MetadataTableConfiguration
MetricsConfigurations
Array<MetricsConfiguration>
NotificationConfiguration
NotificationConfiguration
ObjectLockConfiguration
ObjectLockConfiguration
ObjectLockEnabled
boolean
OwnershipControls
OwnershipControls
PublicAccessBlockConfiguration
PublicAccessBlockConfiguration
ReplicationConfiguration
ReplicationConfiguration
Tags
Array<Tag>
VersioningConfiguration
VersioningConfiguration
WebsiteConfiguration
WebsiteConfiguration

Return Values

Values returned after the resource is created. Access these with Fn::GetAtt.

AttributeTypeDescription
Arnstring-
DomainNamestring-
DualStackDomainNamestring-
RegionalDomainNamestring-
WebsiteURLstring-

Sample CloudFormation Template

A minimal template with required properties and common optional ones.

template.yaml
AWSTemplateFormatVersion: "2010-09-09"
Description: Sample template for AWS::S3::Bucket

Resources:
  MyResource:
    Type: AWS::S3::Bucket
    Properties:
      Tags:
        - Key: Environment
          Value: Production

Required IAM Permissions

Permissions CloudFormation needs in your IAM role to manage this resource.

create

s3:CreateBuckets3:PutBucketTaggings3:TagResources3:PutBucketAbacs3:PutAnalyticsConfigurations3:PutEncryptionConfigurations3:PutBucketCORSs3:PutInventoryConfiguration

read

s3:GetAccelerateConfigurations3:GetLifecycleConfigurations3:GetBucketPublicAccessBlocks3:GetAnalyticsConfigurations3:GetBucketCORSs3:GetEncryptionConfigurations3:GetInventoryConfigurations3:GetBucketLogging

update

s3:PutBucketAcls3:PutBucketTaggings3:TagResources3:UntagResources3:PutBucketAbacs3:PutAnalyticsConfigurations3:PutEncryptionConfigurations3:PutBucketCORS

delete

s3:DeleteBuckets3:ListBucket

list

s3:ListAllMyBuckets

Get the S3 Cheat Sheet

Everything you need to know about S3 on one page. HD quality, print-friendly.

Download Free Infographic

Quick Facts

ServiceS3
Properties28
Required0
TaggingSupported
Primary IDBucketName

Supported Operations

CreateReadUpdateDeleteList

Immutable After Creation

These properties cannot be changed after the resource is created. Updating them triggers a replacement.

BucketName

External Links