exam questions

Exam AWS Certified Solutions Architect - Professional All Questions

View all questions & answers for the AWS Certified Solutions Architect - Professional exam

Exam AWS Certified Solutions Architect - Professional topic 1 question 512 discussion

A company is using AWS CloudFormation to deploy its infrastructure. The company is concerned that, if a production CloudFormation stack is deleted, important data stored in Amazon RDS databases or Amazon EBS volumes might also be deleted.
How can the company prevent users from accidentally deleting data in this way?

  • A. Modify the CloudFormation templates to add a DeletionPolicy attribute to RDS and EBS resources.
  • B. Configure a stack policy that disallows the deletion of RDS and EBS resources.
  • C. Modify IAM policies to deny deleting RDS and EBS resources that are tagged with an ג€aws:cloudformation:stack-nameג€ tag.
  • D. Use AWS Config rules to prevent deleting RDS and EBS resources.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️
With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, Amazon S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks.
Reference:
https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html

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
donathon
Highly Voted 3 years, 7 months ago
A With the DeletionPolicy attribute you can preserve or (in some cases) backup a resource when its stack is deleted. You specify a DeletionPolicy attribute for each resource that you want to control. If a resource has no DeletionPolicy attribute, AWS CloudFormation deletes the resource by default. To keep a resource when its stack is deleted, specify Retain for that resource. You can use retain for any resource. For example, you can retain a nested stack, Amazon S3 bucket, or EC2 instance so that you can continue to use or modify those resources after you delete their stacks. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
upvoted 25 times
...
huhupai
Highly Voted 3 years, 7 months ago
I would go for A.
upvoted 11 times
...
SkyZeroZx
Most Recent 1 year, 10 months ago
Selected Answer: A
A classic usage of DeletionPolicy in CloudFormation
upvoted 1 times
...
Aum
2 years, 5 months ago
why not B? Stack policy can also disallows deletion of resources within the stack. "A" just said to configure "DeletionPolicy" it didn't actually say to prevent deletion. You can actually set it to snapshot before delete, etc.
upvoted 2 times
...
cldy
3 years, 4 months ago
A. Modify the CloudFormation templates to add a DeletionPolicy attribute to RDS and EBS resources.
upvoted 1 times
...
AzureDP900
3 years, 4 months ago
A is right
upvoted 1 times
...
moon2351
3 years, 5 months ago
The answer is definitely A.
upvoted 1 times
...
WhyIronMan
3 years, 5 months ago
I'll go with A
upvoted 1 times
...
Waiweng
3 years, 5 months ago
it's A
upvoted 2 times
...
Ebi
3 years, 6 months ago
A is the answer
upvoted 3 times
...
Bulti
3 years, 6 months ago
Answer is A
upvoted 2 times
...
T14102020
3 years, 6 months ago
Correct is A. CloudFormation
upvoted 1 times
...
jackdryan
3 years, 6 months ago
I'll go with A
upvoted 2 times
...
gookseang
3 years, 6 months ago
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
upvoted 1 times
...
ipindado2020
3 years, 6 months ago
A for sure
upvoted 1 times
...
fullaws
3 years, 6 months ago
A is correct
upvoted 1 times
...
NikkyDicky
3 years, 6 months ago
A for sure
upvoted 1 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