
Explanation:
DeletionPolicy: Snapshot is only valid for resources that support snapshots, such as RDS DBInstances and EC2 volumes. For AWS::S3::Bucket, valid values are Delete and Retain.
Ultimate access to all questions.
What will happen to the S3 bucket when the CloudFormation stack is deleted?
Resources:
DataLakeBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Snapshot
Properties:
BucketName: company-data-lake
VersioningConfiguration:
Status: Enabled
Resources:
DataLakeBucket:
Type: AWS::S3::Bucket
DeletionPolicy: Snapshot
Properties:
BucketName: company-data-lake
VersioningConfiguration:
Status: Enabled
A
The bucket is deleted along with all its objects
B
The bucket is retained in your account without deletion
C
CloudFormation throws a validation error — Snapshot is invalid for S3
D
A snapshot of the bucket is created before deletion
No comments yet.