-
Notifications
You must be signed in to change notification settings - Fork 4.5k
AwsCdkCli: Unable to provide Environment to Bootstrap command #31656
Copy link
Copy link
Closed
Labels
bugThis issue is a bug.This issue is a bug.cliIssues related to the CDK CLIIssues related to the CDK CLIeffort/mediumMedium work item – several days of effortMedium work item – several days of effortp2package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI
Description
Describe the bug
I am attempting to run the bootstrap command from a lambda.
const cli = AwsCdkCli.fromCdkAppDirectory();
await cli.bootstrap();
This gives the error Error: Specify an environment name like 'aws://123456789012/us-east-1'.
When running cdk bootstrap from the terminal, I would provide this value. But I don't see anywhere in BootstrapOptions to provide this.
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Version
No response
Expected Behavior
I would expect to have somewhere here I would provide the environment information.
Current Behavior
Currently I get this error message Error: Specify an environment name like 'aws://123456789012/us-east-1'.
Reproduction Steps
Run code similar to the following in a lambda.
const cli = AwsCdkCli.fromCdkAppDirectory();
await cli.bootstrap();
Possible Solution
Add a field in BootstrapOptions to accept the environment information like "aws://123456789012/us-east-1".
Additional Information/Context
No response
CDK CLI Version
N/A
Framework Version
No response
Node.js Version
aws_lambda.Runtime.NODEJS_20_X
OS
AWS Lambda
Language
TypeScript
Language Version
No response
Other information
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugThis issue is a bug.This issue is a bug.cliIssues related to the CDK CLIIssues related to the CDK CLIeffort/mediumMedium work item – several days of effortMedium work item – several days of effortp2package/toolsRelated to AWS CDK Tools or CLIRelated to AWS CDK Tools or CLI