localstack / localstack/aws-cdk-local

Not able to changes default account id (000000000000) of cdklocal.

Open
#93 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
305
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I tried:

1. I have tried adding export CDK_DEFAULT_ACCOUNT, but it did not picking up the account from the env, it still points to 000000000000.

2. I was able to change the default region by doing aws configure, cdklocal synth --profile localstack, but aws configure doesn't accept account id.

Why I want to change default account id. we have account specific context in cdk.json, when we run cdklocal synth it's try to pickup account specifc context based on account id.

cdk.json:

{
"context": {
"account-id": {
"bucket-name": "test-dev"
},
"account-id2": {
"bucket-name": "test-dev"
}
}
}

app.py:

context = app.node.try_get_context(os.environ["CDK_DEFAULT_ACCOUNT"])

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the report with `cdklocal synth --profile localstack`, then inspect the `cdk.json` context and the `app.py` lookup using `CDK_DEFAULT_ACCOUNT`. Confirm whether the account-specific context is selected from the environment or remains `000000000000`; done means the requested account id selects the corresponding context.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, javascript, python
Domain
cloud, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.