aws-cdk-local: Bootstrap failure 12/14
This is not an issue but a plea for help. When I run synth it returns
Synthesizing this full stack, Stack Name: mytestStack Not making progress trying to resolve environmental context. Giving up. [Error at /mytestStack] Need to perform AWS calls for account 123456789012, but no credentials have been configured
I tried following this link https://github.com/localstack/aws-cdk-local/issues/39 but to no avail. Ive also looked at the other issues
I am trying to run cdklocal in gitlab ci
localstack is up and running before I run synth. I can create a bucket etc…
here are the services that are available
curl localstack:4566/health % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 864 100 864 0 0 96000 0 --:--:-- --:--:-- --:--:-- 105k {"features": {"initScripts": "initialized"}, "services": {"acm": "available", "apigateway": "available", "cloudformation": "available", "cloudwatch": "available", "config": "available", "dynamodb": "available", "dynamodbstreams": "available", "ec2": "available", "es": "available", "events": "available", "firehose": "available", "iam": "available", "kinesis": "available", "kms": "available", "lambda": "available", "logs": "available", "opensearch": "available", "redshift": "available", "resource-groups": "available", "resourcegroupstaggingapi": "available", "route53": "available", "route53resolver": "available", "s3": "available", "secretsmanager": "available", "ses": "available", "sns": "available", "sqs": "available", "ssm": "available", "stepfunctions": "available", "sts": "available", "support": "available", "swf": "available"}, "version": "0.14.0"}
How do I satisfy the credentials cdklocal needs? This is my latest try in the ci file
- aws configure set aws_access_key_id foo
- aws configure set aws_secret_access_key bar
- echo "[default]" > ~/.aws/config
- echo "region = us-east-1" >> ~/.aws/config
- echo "sso_account_id = 123456789012" >> ~/.aws/config
- echo "sso_role_name = 123456789012MyRoleName" >> ~/.aws/config
- echo "output = json" >> ~/.aws/config
This is the resultant config and creds when i cat the files when the ci job runs
$ cat ~/.aws/config
[default]
region = us-east-1
sso_account_id = 123456789012
sso_role_name = 123456789012MyRoleName
output = json
$ cat ~/.aws/credentials
[default]
aws_access_key_id = foo
aws_secret_access_key = bar
These are variables
variables:
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: foo
AWS_SECRET_ACCESS_KEY: bar
STACK_NAME: mytestStack
CDK_DEPLOY_REGION: us-east-1
CDK_DEPLOY_ACCOUNT: 123456789012
This is how I am running synth
- cdklocal synthesize --profile default -v
here are the version of awscli and aws-cdk-local. Could Node be issue?
$ cdklocal --version
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! !!
!! Node v11.15.0 has reached end-of-life and is not supported. !!
!! You may to encounter runtime issues, and should switch to a supported release. !!
!! !!
!! As of the current release, supported versions of node are: !!
!! - ^12.7.0 !!
!! - ^14.5.0 !!
!! - ^16.3.0 !!
!! - ^17.3.0 !!
!! !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
(node:1486) ExperimentalWarning: queueMicrotask() is experimental.
2.15.0 (build 151055e)
$ aws --version
aws-cli/1.19.112 Python/2.7.17 Linux/5.4.0-1009-aws botocore/1.20.112
Here is some of the verbose output
CDK toolkit version: 2.15.0 (build 151055e) Command line arguments: { _: [ 'synth' ], profile: 'default', v: 1, verbose: 1, deployAccount: 123456789012, deployRegion: 'us-east-1', lookups: true, 'ignore-errors': false, ignoreErrors: false, json: false, j: false, debug: false, ec2creds: undefined, i: undefined, 'version-reporting': undefined, versionReporting: undefined, 'path-metadata': true, pathMetadata: true, 'asset-metadata': true, assetMetadata: true, 'role-arn': undefined, r: undefined, roleArn: undefined, staging: true, 'no-color': false, noColor: false, validation: true, quiet: false, q: false, '$0': 'cdklocal' }
I am wondering if the REAL VPC I need to reference in my project is causing the issue. I x-ed out the leading 7 chars
Setting "vpc-provider:account=123456789012:filter.vpc-id=vpc-xxxxxxxxce5f18eb92:region=us-east-1:returnAsymmetricSubnets=true" context to {"$providerError":"Need to perform AWS calls for account 123456789012, but no credentials have been configured","$dontSaveContext":true}
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
context: { 'vpc-provider:account=123456789012:filter.vpc-id=vpc-xxxxxxxce5f18eb92:region=us-east-1:returnAsymmetricSubnets=true':
{ '$providerError':
'Need to perform AWS calls for account 123456789012, but no credentials have been configured',
'$dontSaveContext': true },
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (3 by maintainers)
@whummer I figured out LOCALSTACK_HOSTNAME: localhost