localstack / aws-cdk-local

Thin wrapper script for using the AWS CDK CLI with LocalStack
Apache License 2.0
263 stars 17 forks source link

Multi-account with LocalStack PRO and cdklocal does not honor the custom account ID #74

Closed dominikschubert closed 10 months ago

dominikschubert commented 1 year ago
export AWS_ACCESS_KEY_ID=000000000001
export AWS_SECRET_ACCESS_KEY=test
export AWS_REGION=us-east-1

cdklocal bootstrap

Expected behavior: LocalStack creates an ECR repository in account 000000000001 Actual behavior: LocalStack creates an ECR repository in account 000000000000

vincenthongzy commented 1 year ago

@dominikschubert apologies for the ping, is this issue still being looked into?

whummer commented 1 year ago

@dominikschubert Just gave this a quick try with the latest version of LocalStack and cdklocal (using CDK version 2.62.2).

$ cd /tmp
$ export AWS_ACCESS_KEY_ID=000000000001 AWS_SECRET_ACCESS_KEY=test AWS_REGION=us-east-1
$ cdklocal init app --language=python
...
$ pip install -r requirements.txt
...
$ cdklocal bootstrap
...
 ✅  Environment aws://000000000001/us-east-1 bootstrapped.
...
$ awslocal ecr describe-repositories | grep repositoryName
...
            "repositoryName": "cdk-hnb659fds-container-assets-000000000001-us-east-1",
...

Looks like this issue is potentially already solved in the meantime?

@vincenthongzy Are you able to replicate these results? Please note that for ECR to work fully end-to-end, you'll need a LocalStack Pro license (free trial available). Please keep us posed on how it goes.. Thanks!

lakkeger commented 10 months ago

Hi @vincenthongzy! We just wanted to follow up to see whether your issue has been resolved. Were you able to get it working with the latest version of LocalStack? We would appreciate your feedback!

vincenthongzy commented 10 months ago

Apologies for the late reply, but yes this does work with the latest version of localstack-pro and aws-cdk-local !

lakkeger commented 10 months ago

Thank you for your feedback. We are delighted it's working! If you experience any other issues, please do not hesitate to contact us.