Skip to main content
When you create an environment for the first time, Gapstack starts a deploy and creates that environment’s CloudFormation stack in your AWS account. If that first deploy fails, Gapstack cannot recover the environment. There is no repair or retry path in the product. You must clean up in AWS, delete the environment, fix the cause, and create the environment again.
A failed first deploy cannot be recovered in Gapstack. Delete the CloudFormation stack in AWS, delete the environment, then recreate it after you fix the failure.
This is an AWS limitation. When CloudFormation creates a stack for the first time and that create fails, there is no previous stack to roll back to. AWS does not offer a recover or retry path on that failed create. You must delete the stack and create it again.

Before you recreate

Open the failed workflow and read State Records. Find the event with a status reason. That is the CloudFormation error. Fix that problem before you create the environment again. Otherwise the next first deploy fails the same way.

Recover from a failed first deploy

1

Delete the stack in AWS

Sign in to the AWS account and region for that environment. Open CloudFormation and delete the environment stack.See Delete a stack from the CloudFormation console. Wait until the stack is gone. If AWS reports resources it could not delete, remove those resources, then delete the stack again.
2

Delete the environment in Gapstack

Open the project, delete the failed environment, and confirm it no longer appears in the list.
3

Fix the cause

Use the workflow error to correct the configuration, permissions, resource settings, or artifact path that caused the failure.
4

Create the environment again

Create a new environment and let the first deploy run. Watch Workflows until the stack completes.
Later deploys on an environment that already completed once can fail and roll back. This page is only for the first deploy of a new environment.