exam questions

Exam AWS DevOps Engineer Professional All Questions

View all questions & answers for the AWS DevOps Engineer Professional exam

Exam AWS DevOps Engineer Professional topic 1 question 190 discussion

Exam question from Amazon's AWS DevOps Engineer Professional
Question #: 190
Topic #: 1
[All AWS DevOps Engineer Professional Questions]

A company has developed a static website hosted on an Amazon S3 bucket. The website is deployed using AWS CloudFormation. The Cloud Formation template defines an S3 bucket and a custom resource that copies content into the bucket from a source location.

The company has decided that it needs to move the website to a new location, so the existing CloudFormation stack must be deleted and re-created. However, CloudFormation reports that the stack could not be deleted cleanly.

What is the MOST likely cause and how can the DevOps engineer mitigate this problem for this and future versions of the website?

  • A. Deletion has failed because the S3 bucket has an active website configuration. Modify the CloudFormation template to remove the WebsiteConfiguration property from the S3 bucket resource
  • B. Deletion has failed because the S3 bucket is not empty. Modify the custom resource's AWS Lambda function code to recursively empty the bucket when RequestType is Delete.
  • C. Deletion has failed because the custom resource does not define a deletion policy. Add a DeletionPolicy property to the custom resource definition with a value of RemoveOnDeletion.
  • D. Deletion has failed because the S3 bucket is not empty. Modify the S3 bucket resource in the CloudFormation template to add a DeletionPolicy property with a value of Empty.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
bgc1
2 years, 1 month ago
Selected Answer: B
Option B as we bucket needs to be empty before it can be deleted
upvoted 1 times
...
SHoKMaSTeR
2 years, 1 month ago
Selected Answer: B
NOT D https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html """ Delete CloudFormation deletes the resource and all its content if applicable during stack deletion. You can add this deletion policy to any resource type. By default, if you don't specify a DeletionPolicy, CloudFormation deletes your resources. However, be aware of the following considerations: For AWS::RDS::DBCluster resources, the default policy is Snapshot. For AWS::RDS::DBInstance resources that don't specify the DBClusterIdentifier property, the default policy is Snapshot. For Amazon S3 buckets, you must delete all objects in the bucket for deletion to succeed. """
upvoted 1 times
...
catboy
2 years, 1 month ago
Agree with B
upvoted 1 times
...
saeidp
2 years, 1 month ago
Selected Answer: B
B is correct. Custom resource
upvoted 1 times
...
Mark1000
2 years, 1 month ago
B is the right answer
upvoted 1 times
...
dangal97
2 years, 1 month ago
Selected Answer: B
I will go with B
upvoted 2 times
...
CloudFloater
2 years, 1 month ago
Selected Answer: D
A - not necessary B - not a recommended approach C - not applicable D - correct
upvoted 1 times
bgc1
2 years, 1 month ago
Option B - For Amazon S3 buckets, you must delete all objects in the bucket for deletion to succeed - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
upvoted 2 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago