Skip to content

Commit

Permalink
Cleaning up S3 templates
Browse files Browse the repository at this point in the history
  • Loading branch information
nmagee committed Jun 23, 2024
1 parent daab06e commit ab2f2b6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions s3/s3-bucket.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 0 additions & 3 deletions s3/s3-website-with-cloudfront-ANNOTATED.template
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand All @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions s3/s3-website-with-cloudfront-norequirements.template
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Parameters:

Resources:
S3Bucket:
DeletionPolicy: 'Delete'
Metadata:
Comment: 'Bucket to store some data'
Properties:
Expand All @@ -18,7 +17,6 @@ Resources:
IndexDocument: index.html
ErrorDocument: error.html
Type: 'AWS::S3::Bucket'
DeletionPolicy: Delete

S3BucketPolicy:
Metadata:
Expand All @@ -37,7 +35,6 @@ Resources:
Resource:
- !Sub 'arn:aws:s3:::${S3Bucket}/*'
Type: 'AWS::S3::BucketPolicy'
DeletionPolicy: Delete

CfDistribution:
Metadata:
Expand Down

0 comments on commit ab2f2b6

Please sign in to comment.