-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cdklocal deploy : unable to figure out localstack presence, building stacks is failing #76
Comments
Same issue cdklocal --version localstack --version |
Same trouble happens to me... At least, I'll try again next year. Pre-requirement
Error Details
vervose logs is below.
|
As explained in nodejs/node#40537, Node v17 now favors IPv6 over IPv4 because it now returns IP addresses in the order they are returned from the name resolver/DNS (merged in nodejs/node#39987). Hence, CDK attempts to connect to LocalStack via IPv6 (using the loopback address Workaround
Related Issues
Follow UpWe'll look into getting this fix into the wrapper itself, to make the switch between IPv4/IPv6 endpoints automatically when using Node >= v17. Possible solutions:
|
@joe4dev Incidentally, I tried to unset ipv6 on MacOS via ipv6 is treated legacy anywhere… |
@terusaku Thank you for your detailed report, which helped to triage the issue 🙏 |
@accessallow @yarik2215 @terusaku We just (2023-02-15T12:22:38.576Z) released a new version of aws-cdk-local 2.17.0, which implements an IPv4 fallback to fix IPv6-related issues on macOS. Can you please check with the latest version? |
@joe4dev I have done execution log; $ npm list --depth=0 -g | grep cdk
├── [email protected]
├── [email protected]
$ echo $LOCALSTACK_HOSTNAME
$ cdklocal bootstrap --profile localstack --debug
⏳ Bootstrapping environment aws://000000000000/ap-northeast-1...
Trusted accounts for deployment: (none)
Trusted accounts for lookup: (none)
Using default execution policy of 'arn:aws:iam::aws:policy/AdministratorAccess'. Pass '--cloudformation-execution-policies' to customize.
CDKToolkit: creating CloudFormation changeset...
✅ Environment aws://000000000000/ap-northeast-1 bootstrapped. |
Thank you for the prompt and detailed confirmation @terusaku . We are happy it is working 🥳 |
~/Documents/Code/CDK_APPS/test master ?1 cdklocal deploy ✔ 9s
✨ Synthesis time: 2.3s
TestStack: building assets...
❌ Building assets failed: Error: Building Assets Failed: Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK Stack, or through the environment
at buildAllStackAssets (/usr/lib/node_modules/aws-cdk/lib/build.ts:21:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at CdkToolkit.deploy (/usr/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:175:7)
at initCommandLine (/usr/lib/node_modules/aws-cdk/lib/cli.ts:358:12)
Building Assets Failed: Error: Unable to resolve AWS account to use. It must be either configured when you define your CDK Stack, or through the environment
cdklocal --version
2.49.0 (build 793dd76)
The text was updated successfully, but these errors were encountered: