An IT team has built an AWS CloudFormation template so others in the company can quickly and reliably deploy and terminate an application. The template creates an Amazon EC2 instance with a user data script to install the application and an Amazon S3 bucket that the application uses to serve static webpages while it is running. All resources should be removed when the CloudFormation stack is deleted. However, the team observes that CloudFormation reports an error during stack deletion, and the S3 bucket created by the stack is not deleted. How can the team resolve the error in the MOST efficient manner to ensure that all resources are deleted without errors?
Select one answer.
Marked answer: B
Community Discussion
Written by other learners. Comments can disagree with the marked answer — check the official documentation when in doubt.
Chose B2
Cloudformation does not have any behavior to force delete not empty bucket, need to invoke a custom lambda function to delete it
Chose B1
Keyword "Custom Resource"
7
B is correct: - Cant delete S3 so must check S3 - There are several DeletionPolition option in ACF: delete, retain, snapshot. For S3, even if there is delete flag, S3 can only be deleted if all objects are removed A: wrong - add delete flag to deleteionpolicy cant forcing deletion of S3 C: should not manually do the task D: should not swap to AWS opsworks