I tried:
-
I have tried adding export CDK_DEFAULT_ACCOUNT, but it did not picking up the account from the env, it still points to 000000000000.
-
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"])