DVA-C02 · Question #580
DVA-C02 Question #580: Real Exam Question with Answer & Explanation
The correct answer is B: Update CloudFormation template with the following deletion policy:. The RetainExceptOnCreate deletion policy ensures that the IAM user is retained after successful stack creation but is deleted if the stack creation fails or rolls back. This meets both requirements.
Question
A developer is preparing to deploy an AWS CloudFormation stack for an application from a template that includes an IAM user. The developer needs to configure the application's resources to retain the IAM user after successful creation. However, the developer also needs to configure the application to delete the IAM user if the stack rolls back. Which configuration will meet these requirements?
Options
- AUpdate CloudFormation template with the following deletion policy:
- BUpdate CloudFormation template with the following deletion policy:
- CUpdate the CloudFormation service role to include the following policy:
- DUpdate the stack policy to include the following statements:
Explanation
The RetainExceptOnCreate deletion policy ensures that the IAM user is retained after successful stack creation but is deleted if the stack creation fails or rolls back. This meets both requirements.
Community Discussion
No community discussion yet for this question.