Skip to content

Commit

Permalink
fix: enable encryption and versioning for S3 buckets defined in app t…
Browse files Browse the repository at this point in the history
…emplates (#447)
  • Loading branch information
moelasmar authored Aug 17, 2023
1 parent d73ceed commit aec0f03
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 0 deletions.
5 changes: 5 additions & 0 deletions dotnet6/s3/{{cookiecutter.project_name}}/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ Resources:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref AppBucketName
BucketEncryption:
ServerSideEncryptionConfiguration:
- BucketKeyEnabled: true
VersioningConfiguration:
Status: Enabled

Outputs:
AppBucketArn:
Expand Down
5 changes: 5 additions & 0 deletions nodejs14.x/s3/{{cookiecutter.project_name}}/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ Resources:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref AppBucketName
BucketEncryption:
ServerSideEncryptionConfiguration:
- BucketKeyEnabled: true
VersioningConfiguration:
Status: Enabled
5 changes: 5 additions & 0 deletions nodejs16.x/s3/{{cookiecutter.project_name}}/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ Resources:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref AppBucketName
BucketEncryption:
ServerSideEncryptionConfiguration:
- BucketKeyEnabled: true
VersioningConfiguration:
Status: Enabled
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ Resources:
# S3 Bucket to host single page app website
WebSiteBucket:
Type: "AWS::S3::Bucket"
Properties:
BucketEncryption:
ServerSideEncryptionConfiguration:
- BucketKeyEnabled: true
VersioningConfiguration:
Status: Enabled
WebSiteBucketPolicy:
Type: "AWS::S3::BucketPolicy"
Properties:
Expand Down
5 changes: 5 additions & 0 deletions nodejs18.x/s3/{{cookiecutter.project_name}}/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,8 @@ Resources:
Type: AWS::S3::Bucket
Properties:
BucketName: !Ref AppBucketName
BucketEncryption:
ServerSideEncryptionConfiguration:
- BucketKeyEnabled: true
VersioningConfiguration:
Status: Enabled

0 comments on commit aec0f03

Please sign in to comment.