Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam AWS Certified SysOps Administrator - Associate All Questions

View all questions & answers for the AWS Certified SysOps Administrator - Associate exam

Exam AWS Certified SysOps Administrator - Associate topic 1 question 164 discussion

A SysOps administrator created an AWS CloudFormation template that provisions Amazon EC2 instances, an Elastic Load Balancer (ELB), and an Amazon RDS DB instance. During stack creation, the creation of the EC2 instances and the creation of the ELB are successful. However, the creation of the DB instance fails.

What is the default behavior of CloudFormation in this scenario?

  • A. CloudFormation will roll back the stack and delete the stack.
  • B. CloudFormation will roll back the stack but will not delete the stack.
  • C. CloudFormation will prompt the user to roll back the stack or continue.
  • D. CloudFormation will successfully complete the stack but will report a failed status for the DB instance.
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
traja
Highly Voted 1 year, 11 months ago
Selected Answer: B
Ans is B. It will delete all the resources in the stack but stack deletion will be manual.
upvoted 10 times
...
Vivec
Highly Voted 1 year, 8 months ago
Selected Answer: B
By default, when a resource creation fails during the creation of a CloudFormation stack, CloudFormation will roll back the stack to its previous state, undoing any changes made to the stack. Therefore, the answer is B. CloudFormation will roll back the stack but will not delete the stack. This allows the administrator to troubleshoot the issue that caused the failure and attempt to create the stack again.
upvoted 5 times
...
ivaldesgo
Most Recent 1 week, 6 days ago
Selected Answer: A
CloudFormation by default delete everything after the rollback.
upvoted 1 times
...
ivaldesgo
1 week, 6 days ago
CloudFormation by default delete everything after the rollback.
upvoted 1 times
...
Aamee
1 month, 3 weeks ago
Selected Answer: B
B for sure!
upvoted 1 times
...
10cc6ba
4 months ago
Selected Answer: A
A. CloudFormation will roll back the stack and delete the stack. Explanation: When a stack creation fails, AWS CloudFormation automatically rolls back all resources that were created up to the point of failure. This behavior is intended to ensure that partial and potentially unstable stacks are not left in your account. This rollback operation includes deleting any resources that were successfully created before the failure occurred. This means that both the EC2 instances and the Elastic Load Balancer will be deleted since the creation of the DB instance failed. This automatic rollback is the default behavior unless you explicitly specify otherwise by disabling rollback.
upvoted 2 times
Aamee
1 week, 5 days ago
If you've an understanding of the concept of 'Circuit Breaker' for ECS based stacks, you'll come to know what exactly happens during the CFN failure. By default, the stack itself does not get deleted. It's the resources which get deleted IF and only IF you don't specify the 'Retain' configuration property in ur CFN script. Upon CFN failure, it normally shows 'ROLLBACK_COMPLETED' or 'ROLLBACK_IN_PROGRESS' that clearly shows that the stack of the Cloudformation script through which you're trying to create is not deleted.
upvoted 1 times
...
...
King_AWS_202
1 year, 2 months ago
Selected Answer: B
CloudFormation will not delete the stack by default. If you want CloudFormation to delete the stack if it rolls back, you need to specify the DeletionPolicy property in the template. The DeletionPolicy property can have three values: Delete - CloudFormation will delete the stack and all of its resources. Retain - CloudFormation will not delete the stack or any of its resources. Snapshot - CloudFormation will create a snapshot of the DB instance and then delete the stack. In this case, the default behavior is to roll back the stack and not delete the stack.
upvoted 3 times
...
Andrew_A
1 year, 4 months ago
Selected Answer: B
CloudFormation will delete the resources it created during the stack creation attempt but it will not remove the stack record itself. This allows you to review the stack events and troubleshoot the reason for failure. I hope this clarifies the matter.
upvoted 4 times
...
Gomer
1 year, 7 months ago
Second quote blurs the distinction between A and B, but I think answer is still B. I actually creating a stack it with a template with an intentional error (acloud.guru demo/lab file). The stack roll back out as expected and the stack did not delete itself, and I still had the stack listed under the "stacks" menu. Even though it had known error and never had a "last known stable state", I saw it listed in stacks menu, and I wasn't able to create another stack using the "TestStack stack (e.g. Error "Stack name allready exists") Don't mean to ramble on here, but sometimes the AWS exam questions and answers don't exactly match the reality in the AWS console. Facts: (*) "Roll back all stack resources" (default setting from CloudFormation create stack menu) "Specify the rollback-stack operation to roll back a stack to its last stable state." "Note: The rollback-stack operation will delete a stack if it doesn't contain a last known stable state." https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-failure-options.html
upvoted 3 times
...
SomboonCH
1 year, 8 months ago
Selected Answer: A
I think A The rollback-stack operation will delete a stack if it doesn't contain a last known stable state. https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stack-failure-options.html
upvoted 4 times
...
awsguru1998
1 year, 9 months ago
B CloudFormation will roll back the stack in the event of a failed resource. It will not delete the stack automatically, and will instead leave it in a failed state. The user will then have the option to roll back the stack manually or continue with the stack in its failed state.
upvoted 2 times
...
anderri
1 year, 9 months ago
A "If the stack updates fails, CloudFormation rolls back changes to restore the stack to the last known working state." Restore the stack means deleting the new objects created during the stack.
upvoted 1 times
defmania00
1 year, 8 months ago
Yes, but it won't delete the stack, just de objects it created.
upvoted 1 times
...
...
Deeezz
1 year, 9 months ago
The answer is A. Reference ....https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-whatis-howdoesitwork.html
upvoted 1 times
Deeezz
1 year, 9 months ago
"After all the resources have been created, CloudFormation reports that your stack has been created. You can then start using the resources in your stack. If stack creation fails, CloudFormation rolls back your changes by deleting the resources that it created." - AWS
upvoted 1 times
joanneli77
1 year, 9 months ago
....annnnd the stack remains. Even with "Create Failed" status, you can highlight then delete the stack... this means the stack is not deleted. It's rolled back. If the stack is created the first time, the rollback is to no objects, but the stack remains, effectively empty. The answer is B.
upvoted 1 times
...
...
...
skywalker
1 year, 10 months ago
Selected Answer: A
I think is A... it will attempt to delete the stack and rolback...
upvoted 1 times
...
MrMLB
1 year, 11 months ago
Selected Answer: B
B. CloudFormation will roll back the stack but will not delete the stack. In AWS CloudFormation, if the creation of a resource within a stack fails, CloudFormation will roll back the entire stack to its previous state. This means that any resources that were created successfully will be deleted, and the stack will be returned to the state it was in before the stack creation began. However, CloudFormation does not delete the stack itself in this scenario. Instead, the stack remains in a failed state, and the administrator can choose to roll back the stack or continue with the stack creation.
upvoted 3 times
...
michaldavid
1 year, 11 months ago
Selected Answer: B
bbbbbbb
upvoted 2 times
...
Pepepep
1 year, 11 months ago
It is B. https://stelligent.com/2020/08/17/removing-errors-on-cloudformation-stack-creation/
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 ...