Difference between revisions of "Cloudformation AWS::S3::Bucket example"

From wikieduonline
Jump to navigation Jump to search
Line 23: Line 23:
 
           - ServerSideEncryptionByDefault:
 
           - ServerSideEncryptionByDefault:
 
               SSEAlgorithm: AES256
 
               SSEAlgorithm: AES256
 +
 +
== Related ==
 +
* [[aws s3 mb]]
  
  
 
== See also ==
 
== See also ==
 
* {{CloudFormation}}
 
* {{CloudFormation}}

Revision as of 10:45, 30 March 2022

AWSTemplateFormatVersion: "2010-09-09"
Description: Create an S3 bucket.

Parameters:
  BucketName:
    Type: String
    Description: The name of the S3 bucket. 

Resources:
 TemplatesBucket:
    Type: AWS::S3::Bucket
    DeletionPolicy: Retain
    UpdateReplacePolicy: Retain
    Properties:
      BucketName: !Ref BucketName
      PublicAccessBlockConfiguration:
        BlockPublicAcls: true
        BlockPublicPolicy: true
        IgnorePublicAcls: true
        RestrictPublicBuckets: true
      BucketEncryption:
        ServerSideEncryptionConfiguration:
          - ServerSideEncryptionByDefault:
              SSEAlgorithm: AES256

Related


See also

Advertising: