You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typescript/elasticbeanstalk/elasticbeanstalk-environment sample is not deploy complete with stack status CREATE_FAILED
CloudFormation stack - Event shows CREATE_FAILED message below.
"CREATE_FAILED | AWS::ElasticBeanstalk::Environment | Environment Resource handler returned message: "Resource of type 'AWS::ElasticBeanstalk::Environment' with identifier '<environment-name>' did not stabilize." (RequestToken: XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX, HandlerErrorCode: NotStabilized)
From Elastic Beanstalk Managed console - Environment - - Events displays these ERROR messages.
1 月 8, 2025 11:37:10 (UTC+9) | ERROR | Failed to launch environment.
1 月 8, 2025 11:37:10 (UTC+9) | ERROR | Environment must have instance profile associated with it.
Expected Behavior
typescript/elasticbeanstalk/elasticbeanstalk-environment sample is deploy complete with stack status "CREATE_COMPLETE".
Current Behavior
From Elastic Beanstalk Managed console - Environment - - Events displays these ERROR messages.
1 月 8, 2025 11:37:10 (UTC+9) | ERROR | Failed to launch environment.
1 月 8, 2025 11:37:10 (UTC+9) | ERROR | Environment must have instance profile associated with it.
Reproduction Steps
Change cdk.json to below, because of platform retired. ( "platformArn" should found aws elasticbeanstalk list-platform-versions command result. )
{
"context": {
"platform": "arn:aws:elasticbeanstalk:ap-northeast-1::platform/Tomcat 10 with Corretto 21 running on 64bit Amazon Linux 2023/5.4.2"
},
"app": "node index"
}
In index.ts, because of deprecated warning.
// to ensure the application is created before the environment// env.addDependsOn(app);env.addDependency(app);
cdk synth
cdk deploy
Possible Solution
No response
Additional Information/Context
Is sample too old? ( 4 years ago )
CDK CLI Version
2.174.0 (build 9604329)
Framework Version
No response
Node.js Version
v22.12.0
OS
Windows 11 23H2
Language
Typescript
Language Version
typescript (5.7.2)
The text was updated successfully, but these errors were encountered:
This is a race condition in the account when it is the first time that you use the Elastic Beanstalk. If someone would like to create the ElasticBeanstalk role aws-elasticbeanstalk-ec2-role explicitly and add it to the stack so that it does not fail deploy.
This would work or hard to replicate if someone already deployed a ElasticBeanstalk application via the console and then goes to run this cdk app it would work. This is because ElasticBeanstalk would create this role that can be used later on that initial app/env creation via the console.
If you would like to creat a PR for the fix here is the example code how to fix it.cdk-git
Describe the bug
typescript/elasticbeanstalk/elasticbeanstalk-environment sample is not deploy complete with stack status CREATE_FAILED
CloudFormation stack - Event shows CREATE_FAILED message below.
From Elastic Beanstalk Managed console - Environment - - Events displays these ERROR messages.
Expected Behavior
typescript/elasticbeanstalk/elasticbeanstalk-environment sample is deploy complete with stack status "CREATE_COMPLETE".
Current Behavior
From Elastic Beanstalk Managed console - Environment - - Events displays these ERROR messages.
Reproduction Steps
Change cdk.json to below, because of platform retired. ( "platformArn" should found aws elasticbeanstalk list-platform-versions command result. )
In index.ts, because of deprecated warning.
cdk synth
cdk deploy
Possible Solution
No response
Additional Information/Context
Is sample too old? ( 4 years ago )
CDK CLI Version
2.174.0 (build 9604329)
Framework Version
No response
Node.js Version
v22.12.0
OS
Windows 11 23H2
Language
Typescript
Language Version
typescript (5.7.2)
The text was updated successfully, but these errors were encountered: