Skip to content

Why is my Elastic Beanstalk environment in a non-operational state?

4 minute read
1

I want to troubleshoot environment operation failures in AWS Elastic Beanstalk because of an AWS CloudFormation stack that's in a non-operational state.

Short description

Elastic Beanstalk creates an CloudFormation stack to manage the resources that are associated with the Elastic Beanstalk environment. You can check this stack in the CloudFormation console with the stack name awseb-envID-stack.

When the Elastic Beanstalk environment enters a non-operational state, the CloudFormation stack shows a FAILED status. You also receive the following error message:

"The stack stack_id associated with environment environment-ID is in stack-status state."

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshooting errors for the AWS CLI. Also, make sure that you're using the most recent AWS CLI version.

To change your Elastic Beanstalk environment to an operational state, use the following table to take actions depending on your CloudFormation stack status:

CloudFormation stack statusCloudFormation actionElastic Beanstalk action
CREATE_FAILEDNoneRun the Rebuild environment or Terminate environment operations.
UPDATE_ROLLBACK_FAILEDBring the stack to a UPDATE_ROLLBACK_COMPLETE status.Retry the operation.
DELETE_FAILEDBring the stack to a DELETE_COMPLETE status.Retry the operation.
UPDATE_ROLLBACK_COMPLETENoneRetry the operation.
UPDATE_COMPLETENoneIf the stack's previous state was CREATE_FAILED, then run the Rebuild or Terminate operation. Otherwise, retry the operation.
DELETE_COMPLETENoneRetry the operation.
ROLLBACK_COMPLETENoneRun the Rebuild environment or Terminate environment operations.

If your CloudFormation stack has a FAILED status, then use one of the following resolutions.

CREATE_FAILED status

When the stack has a CREATE_FAILED status, the environment can't recover. The environment continues to have issues, even if the stack status changes to UPDATE_COMPLETE. If your stack has the CREATE_FAILED status, then you must create a new Elastic Beanstalk environment.

To recreate the environment, select one of the following options:

UPDATE_ROLLBACK_FAILED status

To change the Elastic Beanstalk environment to an operational state, complete the following steps:

  1. Open the CloudFormation console.
  2. Identify the resource that failed to update during the rollback from the stack event, and then address the failure.
  3. Change the stack to the UPDATE_ROLLBACK_COMPLETE status. To do so, perform an update rollback in the CloudFormation console.
  4. In the Continue update rollback dialog box, expand Advanced troubleshooting.
  5. In the Resources to skip - optional section, select the resource that failed to update.
  6. Choose Continue update rollback. The stack now shows the UPDATE_ROLLBACK_COMPLETE status.
  7. Retry the operation that returned the error.

DELETE_FAILED status

To change the Elastic Beanstalk environment to an operational state, complete the following steps:

  1. Open the CloudFormation console.
  2. Identify the resource that failed to delete during the stack event.
  3. Manually delete the resource. For example, if the resource is a security group, then delete the security group from the Amazon Elastic Compute Cloud (Amazon EC2) console.
  4. Delete the CloudFormation stack from the CloudFormation console. The deleted stack shows a DELETE_COMPLETE status.
  5. Retry the Terminate environment or Rebuild environment operations.

For more information, see How do I terminate or rebuild my Elastic Beanstalk environment when the AWSEBSecurityGroup fails to delete?

Related information

Recovering your Elastic Beanstalk environment from an invalid state

AWS OFFICIALUpdated 8 months ago
4 Comments

My support plan is Basic. Do I have to upgrade my AWS Support plan to "contact the AWS Support team to change the environment to an Available state"?

replied 2 years ago

Going forward, you won't need to contact AWS support to change your environment's status to Available. Instead, you'll receive an error message detailing the status of the CloudFormation stack linked to your environment. After resolving the error, you can proceed with the recommended steps outlined in the article.

AWS
replied a year ago

chore; I found a small typo in the table and wanted to bring it to your attention.

- UDPATE_ROLLBACK_FAILED	
+ UPDATE_ROLLBACK_FAILED	
replied 10 months ago

Thank you for your comment. We'll review and update the Knowledge Center article as needed.

AWS
MODERATOR
replied 10 months ago