Skip to content

typescript/elasticbeanstalk/elasticbeanstalk-environment sample is not deploy complete with stack status CREATE_FAILED" #1126

@Jun-KODAMA-SCSK

Description

@Jun-KODAMA-SCSK

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.

"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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.ngde/podGreat issues for podsp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions