ValidationError Stack:arn aws cloudformation stack is in ROLLBACK_COMPLETE state and can not be updated

前端 未结 2 1147
野性不改
野性不改 2020-12-17 07:30

When I deploy using cloudformation aws cloudformation deploy --region $region --stack-name ABC

Got error:

An error occurred (Val

相关标签:
2条回答
  • 2020-12-17 08:12

    This happens when stack creation fails. By default the stack will remain in place with a status of ROLLBACK_COMPLETE. This means it's successfully rolled back (deleted) all the resources which the stack had created. The only thing remaining is the empty stack itself. You cannot update this stack; you must manually delete it, after which you can attempt to deploy it again.

    If you set "Rollback on failure" to disabled in the console (or set --on-failure to DO_NOTHING in the CLI command), stack creation failure will instead result in a status of CREATE_FAILED. Any resources created before the point of failure won't have been rolled back.

    If instead you were deploying updates to an existing (successfully created) stack, and the updates failed but were successfully rolled back, it will go back into its previous valid state (with a status of UPDATE_ROLLBACK_COMPLETE), allowing you to reattempt updates.


    As @SteffenOpel points out, you can now specify that a stack should be deleted on failure by setting the --on-failure option to DELETE in the CLI. This option is not yet available in the console.

    0 讨论(0)
  • 2020-12-17 08:19

    Run the following AWS CLI command to delete your stack:

    aws cloudformation delete-stack --stack-name <<stack-name>>
    

    It may take less than a minute to delete your stack, and then try re-deploying it.

    0 讨论(0)
提交回复
热议问题