exam questions

Exam AWS Certified Developer Associate All Questions

View all questions & answers for the AWS Certified Developer Associate exam

Exam AWS Certified Developer Associate topic 1 question 91 discussion

Exam question from Amazon's AWS Certified Developer Associate
Question #: 91
Topic #: 1
[All AWS Certified Developer Associate Questions]

A developer received the following error message during an AWS CloudFormation deployment:
DELETE_FAILED (The following resource(s) failed to delete: [ASGInstanceRolel2345678].)
Which action should the developer take to resolve this error?

  • A. Contact AWS Support to report an issue with the Auto Scaling Groups (ASG) service.
  • B. Add a DependsOn attribute to the ASGInstanceRole12345678 resource in the CloudFormation template. Then delete the stack.
  • C. Modify the CloudFormation template to retain the ASGInstanceRolel2345678 resource. Then manually delete the resource after deployment.
  • D. Add a force parameter when calling CloudFormation with the role-arn of ASGInstanceRolel2345678.
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
XAvenger
Highly Voted 2 years, 7 months ago
Selected Answer: C
It is not mentioned anywhere that deletion failed due to dependency on something. For example CloudFormation cannot delete S3 buckets or ECR repositories if they are not empty. In this case only manual deletion helps. So "B" -> incorrect, C -> correct
upvoted 10 times
...
robbyboss
Highly Voted 2 years, 7 months ago
Selected Answer: B
B: Declare dependencies for resources that must be created or deleted in a specific order (see https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-dependson.html)
upvoted 5 times
Arnaud92
2 years, 6 months ago
For the DependsOn attribute to be of any help here, it would need to be attached to another resource (a resource that depends on the ASG, and that needs to be deleted before the ASG). Here the option is to add the DependsOn attribute on the ASG itself, so it wouldn't help. B is not correct
upvoted 4 times
...
...
sumanshu
Most Recent 4 months, 1 week ago
Selected Answer: C
C) If the role ASGInstanceRole12345678 cannot be deleted because other resources are still referencing it, the Retain policy allows you to bypass the dependency issue for now by preserving the role. Once the stack deletion completes, you can manually identify and resolve those dependencies before deleting the role. https://repost.aws/knowledge-center/cloudformation-stack-delete-failed
upvoted 3 times
...
5f7ff1a
1 year, 5 months ago
Selected Answer: B
Delete fails only when something is depended on it. So in correct order we need to delete resources.. manually deleting resources is not good way
upvoted 1 times
...
rcaliandro
1 year, 10 months ago
Selected Answer: C
For sure C is the correct answer because if CloudFormation failed because of a particular resource, we can 'retain' the specific resource and try another time the deletion of the template. Then, remove manually the specified resource.
upvoted 1 times
...
Syre
2 years ago
Selected Answer: B
Option C is wrong, it suggests modifying the CloudFormation template to retain the failing resource and then manually deleting it after deployment. This approach may work, but it is not the best practice for handling failed CloudFormation stack deletions. Manually deleting the resource after deployment can be time-consuming and prone to human error, and it may not address the root cause of the issue. By adding a DependsOn attribute, option B, to the resource that depends on the ASGInstanceRolel2345678 resource, the CloudFormation stack deletion process will ensure that the ASGInstanceRolel2345678 resource is deleted first. Once this resource is deleted, the other resource can then be deleted successfully.
upvoted 2 times
npn225
1 year, 6 months ago
Your logic sounds good but I think there's one problem! Option B suggests and even states that we are deleting the entire stack created from the AWS CloudFormation template! But the question talks about this error occurring during the DEPLOYMENT of the specific CloudFormation template! I don't think we delete the entire stack during deployment! No?
upvoted 1 times
...
...
sharmavipul92
2 years, 2 months ago
The question is what should the developer do to resolve the error. The question may be not correctly formed here, but I think B is more suitable to resolve the error.
upvoted 1 times
...
KT_Yu
2 years, 3 months ago
Selected Answer: C
Ans: C Please refer to the following video: https://www.youtube.com/watch?v=pzibJp59yOs&ab_channel=AmazonWebServices Hope thats help --KT
upvoted 3 times
rlnd2000
2 years, 1 month ago
Thanks for the excellent source you provided
upvoted 2 times
...
...
haazybanj
2 years, 6 months ago
Selected Answer: C
C is correct
upvoted 2 times
...
RUKSHANA
2 years, 7 months ago
Selected Answer: C
https://bobcares.com/blog/delete-an-aws-cloudformation-stack/
upvoted 2 times
...
david00
2 years, 7 months ago
Selected Answer: C
C: due to parallel processing you might need to retain some stack resources and delete them manually later :https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-stack-delete-failed/
upvoted 4 times
...
princajen
2 years, 7 months ago
Selected Answer: B
I vote for B! https://aws.amazon.com/premiumsupport/knowledge-center/cloudformation-stack-delete-failed/
upvoted 1 times
nothankyouspankyou
2 years, 5 months ago
Do you mean C? The link is great, but it points to C: "Important: To avoid unnecessary charges, you must manually delete the resources that are retained when the stack is deleted."
upvoted 1 times
...
...
Jabol
2 years, 7 months ago
Selected Answer: C
I think the answer is correct. In case of similar error, AWS asked if I want to retain the resource and delete it manually later.
upvoted 2 times
...
ahmed308
2 years, 7 months ago
Seems option B is more preferable
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