53.9k views
2 votes
What happens if Cloud Formation encounters an error by default?

1) It throws an error and stops the stack creation process.
2) It automatically retries the failed resource creation.
3) It rolls back the entire stack creation process.
4) It ignores the error and continues with the stack creation process.

1 Answer

4 votes

Final answer:

By default, Cloud Formation rolls back the entire stack creation process if it encounters an error, attempting to delete any resources created during the process to return the environment to its initial state.

Step-by-step explanation:

When Cloud Formation encounters an error during stack creation, it doesn't simply throw an error and stop or ignore the error to continue; rather, by default, it rolls back the entire stack creation process. This act of rolling back is an essential feature that ensures partial stacks are not left running, which could result in wasted resources or incomplete infrastructure that doesn't serve its intended purpose. The rollback will attempt to return the environment to its original state by deleting any resources that were created during the failed stack creation attempt.

User JonathanC
by
8.6k points