From ab2f2b6b3cc7ce585819c9a7a43ff93752219db2 Mon Sep 17 00:00:00 2001 From: Neal Magee Date: Sun, 23 Jun 2024 11:22:24 +0000 Subject: [PATCH] Cleaning up S3 templates --- s3/s3-bucket.yaml | 2 -- s3/s3-website-with-cloudfront-ANNOTATED.template | 3 --- s3/s3-website-with-cloudfront-norequirements.template | 3 --- 3 files changed, 8 deletions(-) diff --git a/s3/s3-bucket.yaml b/s3/s3-bucket.yaml index 5060c26..220049c 100644 --- a/s3/s3-bucket.yaml +++ b/s3/s3-bucket.yaml @@ -5,11 +5,9 @@ Parameters: S3BucketName: Type: String Description: The name for the S3 bucket - AllowedPattern: '^[a-z0-9]{5,40}$' Resources: S3Bucket: - DeletionPolicy: 'Delete' Metadata: Comment: 'A Bucket to store some data' Properties: diff --git a/s3/s3-website-with-cloudfront-ANNOTATED.template b/s3/s3-website-with-cloudfront-ANNOTATED.template index d3d0d9d..9045298 100644 --- a/s3/s3-website-with-cloudfront-ANNOTATED.template +++ b/s3/s3-website-with-cloudfront-ANNOTATED.template @@ -7,7 +7,6 @@ Resources: # 1. Creates an S3 bucket that is private, configured to be a website. S3Bucket: - DeletionPolicy: 'Delete' Metadata: Comment: 'Bucket to store some data' Properties: @@ -17,7 +16,6 @@ Resources: IndexDocument: index.html ErrorDocument: error.html Type: 'AWS::S3::Bucket' - DeletionPolicy: Delete # 2. Creates an S3 bucket policy connecting to the CloudFront OriginAccessIdentity. # This policy works with item #4 below and means CloudFront can read the contents of the @@ -39,7 +37,6 @@ Resources: Resource: - !Sub 'arn:aws:s3:::${S3Bucket}/*' Type: 'AWS::S3::BucketPolicy' - DeletionPolicy: Delete # 3. Creates the actual CloudFront distribution, which allows both HEAD and GET methods, with a TTL of 86400. # This means the cache has a duration of 24 hours by default. diff --git a/s3/s3-website-with-cloudfront-norequirements.template b/s3/s3-website-with-cloudfront-norequirements.template index 26c0fb8..46dbdc5 100644 --- a/s3/s3-website-with-cloudfront-norequirements.template +++ b/s3/s3-website-with-cloudfront-norequirements.template @@ -8,7 +8,6 @@ Parameters: Resources: S3Bucket: - DeletionPolicy: 'Delete' Metadata: Comment: 'Bucket to store some data' Properties: @@ -18,7 +17,6 @@ Resources: IndexDocument: index.html ErrorDocument: error.html Type: 'AWS::S3::Bucket' - DeletionPolicy: Delete S3BucketPolicy: Metadata: @@ -37,7 +35,6 @@ Resources: Resource: - !Sub 'arn:aws:s3:::${S3Bucket}/*' Type: 'AWS::S3::BucketPolicy' - DeletionPolicy: Delete CfDistribution: Metadata: