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
latest cdklocal/localstack fails to bootstrap #36
Comments
I re-ran with
|
BTW, I noticed that when I start localstack in the log it has configured my region to be So if I run
Looks like it succeeded, even though it got one Here's the localstack logs for it too
|
When I go ahead and run
it failed and in the localstack log
|
I'm having a very similar issue, though with different output. Also on the latest localstack, but I'm on When I Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment When I ⏳ Bootstrapping environment aws://000000000000/us-east-1...
❌ Environment aws://000000000000/us-east-1 failed bootstrapping: Error: Need to perform AWS calls for account 000000000000, but no credentials have been configured
at SdkProvider.forEnvironment (/Users/sbassin/.nvm/versions/node/v12.20.0/lib/node_modules/aws-cdk-local/node_modules/aws-cdk/lib/api/aws-auth/sdk-provider.ts:149:46)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at Function.lookup (/Users/sbassin/.nvm/versions/node/v12.20.0/lib/node_modules/aws-cdk-local/node_modules/aws-cdk/lib/api/bootstrap/deploy-bootstrap.ts:35:17)
at Bootstrapper.legacyBootstrap (/Users/sbassin/.nvm/versions/node/v12.20.0/lib/node_modules/aws-cdk-local/node_modules/aws-cdk/lib/api/bootstrap/bootstrap-environment.ts:61:21)
at /Users/sbassin/.nvm/versions/node/v12.20.0/lib/node_modules/aws-cdk-local/node_modules/aws-cdk/lib/cdk-toolkit.ts:358:24
at async Promise.all (index 0)
at CdkToolkit.bootstrap (/Users/sbassin/.nvm/versions/node/v12.20.0/lib/node_modules/aws-cdk-local/node_modules/aws-cdk/lib/cdk-toolkit.ts:355:5)
at initCommandLine (/Users/sbassin/.nvm/versions/node/v12.20.0/lib/node_modules/aws-cdk-local/node_modules/aws-cdk/bin/cdk.ts:201:9)
Need to perform AWS calls for account 000000000000, but no credentials have been configured This was working recently with Edit More Context: [profile localstack]
region=us-east-1
output=json and in my [localstack]
aws_access_key_id=test
aws_secret_access_key=test This is also failing in my CI environment where I use environment variables: AWS_DEFAULT_REGION=us-east-1
AWS_SECRET_ACCESS_KEY=test
AWS_ACCESS_KEY_ID=test |
Thanks for reporting @guoliang . Can you please share a full copy of your CDK program (e.g., as a zip file) to help us reproduce this issue? Thanks @sbassin - looks like you're facing a different issue. Can you please share some details about your environment/configuration - is the STS service running in your LocalStack instance? |
Yup. I've got the following services running in LocalStack: |
Thanks @sbassin . I think we were able to reproduce the issue you're facing - can you please give it another try with version |
@whummer I tried it out and it works now
then when I run
both commands ran OK. However when I run deploy again with a small change to my lambda function it failed. |
Hi, @whummer. I just tried with
I've got For what it's worth, I can use Thanks. |
I'm noticing that my cdklocal version is 1.78… so maybe there's still some entanglement? cdklocal --version
1.78.0 (build 2c74f4c) |
@sbassin when you run |
@sbassin Perhaps you may need to clean the existing state in your |
@whummer any idea why it's not possible to update a cdk deploy? |
Ah, @guoliang. I was thinking I'd get the version of cdklocal as the README seems to indicate: The
I thought I might be onto something there about my @whummer, I deleted both However, I then iterated through CDK versions 1.75 through 1.78, each time blowing away my CDK's Each time, cdklocal bootstrap
Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment However! I tried running npx cdklocal bootstrap
⏳ Bootstrapping environment aws://000000000000/us-east-1...
CDKToolkit: creating CloudFormation changeset...
[··························································] (0/3)
✅ Environment aws://000000000000/us-east-1 bootstrapped. I'm not sure what made |
Hi apologies if I'm just adding to the noise. @sbassin - I'm seeing the same issues you're seeing with
Do you mean your global $ npx cdklocal bootstrap
Unable to resolve AWS account to use. It must be either configured when you define your CDK or through the environment $ npm list -g --depth=0 | grep cdk
npm info it worked if it ends with ok
npm info using npm@6.14.6
npm info using node@v12.18.3
├── aws-cdk@1.78.0
├── aws-cdk-local@1.65.2 |
Interesting… I did not touch my global $ npm list -g --depth=0 | grep cdk
├── aws-cdk-local@1.65.2
├── cdk@1.78.0 |
I'm also having the same problem. Looking at the output from
|
Something seems to have changed in aws-cdk which results in the error here. I've tested the following constellations:
In all test runs I've nuked node_modules and docker to start from a clean slate. |
Thanks for the update @Tehnix @denisdifazio @sbassin . We just did a quick test with the versions specified above ( What are the error logs you're seeing - is it the same message as @denisdifazio posted above: |
I have had the same error (well colleagues have and I haven't) - what I had not realized was that something added the following to my
Removing this entry caused the error to occur (aws-cdk-local: 1.65.3, aws-cdk: 1.86.0) |
Using localstack latest (0.12.6) when CDK attempts to lookup default account ID from STS, localstack outputs:
Followed the advice, all working now 😊 |
I'm also seeing
And the output from docker:
I am using I would expect that running
As a workaround I can stop the container and start it again if I need to redeploy my stack, but it's not ideal! 🙂 |
Hi @ben-eb, thanks for the update. Can you please share a copy of your CDK program with us (ideally in a new Github issue) - we'll be happy to look into it and try to reproduce this issue. Thanks for your help! Also - just to confirm, does this problem persist after pulling the |
@whummer Yes, to clarify I am using 0.14.2 here. 👍 I'm afraid the project this is happening in is closed source. I'll see if I can have a look into making a reproduction with less defined in CDK to check if it's a problem with the stack resources. 🙂 |
Hi again @ben-eb , looks like we've been able to replicate this issue, and have now pushed a change which should (hopefully) get it resolved. Can you please pull the |
@whummer Yep, it's working with the latest release. Thanks very much! 👍 |
I upgraded cdklocal and localstack
I'm running localstack on Windows 10 . Below are the versions of the tools
I have started localstack by running
Then when I run
I get the following errors
Prior to upgrading localstack it was still working.
But perhaps this issue has the same cause as #5 ?
The text was updated successfully, but these errors were encountered: