aws-cdk: GovCloud -> Specified bucket does not exist
I’m trying to deploy to govcloud using cdk version 0.21.0, and I can get to the point of creating CloudFormation changesets, (the assets/cdk meta is in s3), but then when creating the changeset I get an error: " ❌ TestApi failed: ValidationError: S3 error: The specified bucket does not exist For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html".
Here’s the verbose cdk deploy output.
Command line arguments: { _: [ 'deploy' ],
trace: false,
strict: false,
'ignore-errors': false,
ignoreErrors: false,
json: false,
j: false,
verbose: true,
v: true,
ec2creds: undefined,
i: undefined,
'version-reporting': undefined,
versionReporting: undefined,
'path-metadata': true,
pathMetadata: true,
version: false,
help: false,
h: false,
'role-arn': undefined,
r: undefined,
roleArn: undefined,
'$0': 'cdk',
app: undefined,
context: undefined,
plugin: undefined,
rename: undefined,
profile: undefined,
proxy: undefined,
'require-approval': undefined,
'toolkit-stack-name': undefined,
STACKS: [] }
Determining whether we're on an EC2 instance.
Does not look like EC2 instance.
cdk.json: {
"app": "node -r dotenv/config cloudformation.js",
"requireApproval": "never"
}
Setting "aws:cdk:toolkit:default-region" context to us-gov-west-1
Resolving default credentials
Retrieved account ID 12345678987654321 from disk cache
Setting "aws:cdk:toolkit:default-account" context to 12345678987654321
context: { 'aws:cdk:toolkit:default-region': 'us-gov-west-1',
'aws:cdk:toolkit:default-account': '12345678987654321',
'aws:cdk:enable-path-metadata': true }
outdir: /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdkMytzxN
outfile: /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdkMytzxN/cdk.out
{ version: '0.19.0',
stacks:
[ { name: 'TestApi',
environment: [Object],
template: [Object],
metadata: [Object] } ],
runtime:
{ libraries:
{ '@aws-cdk/cdk': '0.21.0',
'@aws-cdk/cx-api': '0.21.0',
'@aws-cdk/aws-ec2': '0.21.0',
'@aws-cdk/aws-iam': '0.21.0',
'@aws-cdk/aws-s3': '0.21.0',
'@aws-cdk/aws-kms': '0.21.0',
'@aws-cdk/aws-s3-notifications': '0.21.0',
'@aws-cdk/aws-codepipeline-api': '0.21.0',
'@aws-cdk/aws-events': '0.21.0',
'@aws-cdk/aws-dynamodb': '0.21.0',
'@aws-cdk/aws-applicationautoscaling': '0.21.0',
'@aws-cdk/aws-autoscaling-common': '0.21.0',
'@aws-cdk/aws-cloudwatch': '0.21.0',
'@aws-cdk/assets': '0.21.0',
'@aws-cdk/aws-serverless': '0.21.0',
'@aws-cdk/aws-lambda': '0.21.0',
'@aws-cdk/aws-sqs': '0.21.0',
'@aws-cdk/aws-sns': '0.21.0',
'jsii-runtime': 'node.js/v8.9.2' } } }
Removing outdir /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdkMytzxN
Stack name not specified, so defaulting to all available stacks: TestApi
Using default AWS SDK credentials for account 12345678987654321
Waiting for stack CDKToolkit to finish creating or updating...
TestApi: deploying...
Preparing assets
- /Users/ME/repos/Test-api/_build/api (zip)
Preparing asset {"path":"/Users/ME/repos/Test-api/_build/api","id":"TestApiTestApiApiLambdaAsset696E6B90","packaging":"zip","s3BucketParameter":"TestApiApiLambdaAssetS3Bucket6941F9D0","s3KeyParameter":"TestApiApiLambdaAssetS3VersionKeyF34988D2"}
Preparing zip asset from directory: /Users/ME/repos/Test-api/_build/api
zip archive: /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdk-assetsCHbeiP/archive.zip
Preparing file asset: /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdk-assetsCHbeiP/archive.zip
Using default AWS SDK credentials for account 12345678987654321
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiApiLambdaAsset696E6B90/c992d8450f3a4eb2c9b070d8d3803f6eb84f13c3f61a17ab61c7dcc565a9437f.zip: checking if already exists
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiApiLambdaAsset696E6B90/c992d8450f3a4eb2c9b070d8d3803f6eb84f13c3f61a17ab61c7dcc565a9437f.zip: uploading
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiApiLambdaAsset696E6B90/c992d8450f3a4eb2c9b070d8d3803f6eb84f13c3f61a17ab61c7dcc565a9437f.zip: upload complete
S3 url for _build/api: s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiApiLambdaAsset696E6B90/c992d8450f3a4eb2c9b070d8d3803f6eb84f13c3f61a17ab61c7dcc565a9437f.zip
Updated: _build/api (zip)
- /Users/ME/repos/Test-api/_build/worker (zip)
Preparing asset {"path":"/Users/ME/repos/Test-api/_build/worker","id":"TestApiTestApiWorkerLambdaAsset968F7F09","packaging":"zip","s3BucketParameter":"TestApiWorkerLambdaAssetS3Bucket8738621F","s3KeyParameter":"TestApiWorkerLambdaAssetS3VersionKey6C50483F"}
Preparing zip asset from directory: /Users/ME/repos/Test-api/_build/worker
zip archive: /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdk-assets2JeUzB/archive.zip
Preparing file asset: /var/folders/by/fdfp2zzj3rz9kqp819l6kpvm0000gn/T/cdk-assets2JeUzB/archive.zip
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiWorkerLambdaAsset968F7F09/55a8234937ca9ef83080cf6c81e5ae6fbae765a1cf9e189b551a8efcb17a43d4.zip: checking if already exists
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiWorkerLambdaAsset968F7F09/55a8234937ca9ef83080cf6c81e5ae6fbae765a1cf9e189b551a8efcb17a43d4.zip: uploading
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiWorkerLambdaAsset968F7F09/55a8234937ca9ef83080cf6c81e5ae6fbae765a1cf9e189b551a8efcb17a43d4.zip: upload complete
S3 url for _build/worker: s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/assets/TestApiTestApiWorkerLambdaAsset968F7F09/55a8234937ca9ef83080cf6c81e5ae6fbae765a1cf9e189b551a8efcb17a43d4.zip
Updated: _build/worker (zip)
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/cdk/TestApi/d905fa8a01da407c101c7b5d822cab437f39fe58c8aaf09d94df947b500d4690.yml: checking if already exists
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/cdk/TestApi/d905fa8a01da407c101c7b5d822cab437f39fe58c8aaf09d94df947b500d4690.yml: uploading
s3://cdktoolkit-stagingbucket-1i4zjzlrfs10/cdk/TestApi/d905fa8a01da407c101c7b5d822cab437f39fe58c8aaf09d94df947b500d4690.yml: upload complete
Stored template in S3 at: https://cdktoolkit-stagingbucket-1i4zjzlrfs10.s3.amazonaws.com/cdk/TestApi/d905fa8a01da407c101c7b5d822cab437f39fe58c8aaf09d94df947b500d4690.yml
Attempting to create ChangeSet CDK-861eb256-d225-432f-93c0-8d05b583f523 to create stack TestApi
TestApi: creating CloudFormation changeset...
❌ TestApi failed: ValidationError: S3 error: The specified bucket does not exist
For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
S3 error: The specified bucket does not exist
For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
ValidationError: S3 error: The specified bucket does not exist
For more information check http://docs.aws.amazon.com/AmazonS3/latest/API/ErrorResponses.html
at Request.extractError (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/protocol/query.js:50:29)
at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
at Request.emit (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:683:14)
at Request.transition (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:22:10)
at AcceptorStateMachine.runTo (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:14:12)
at /usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/state_machine.js:26:10
at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:38:9)
at Request.<anonymous> (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/request.js:685:12)
at Request.callListeners (/usr/local/lib/node_modules/aws-cdk/node_modules/aws-sdk/lib/sequential_executor.js:116:18)```
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (8 by maintainers)
@rix0rrr I also meet this problem, it’s China region.
cdk bootstrap, everything’s okcdk deploy -vI checked my S3 bucket found the
123123.ymlhad been uploaded. But the Object URL above is wrong, it should behttps://toolkit-stagebucket.s3.cn-north-1.amazonaws.com.cn/cdk/XUserStack/123123.ymlIs there any way to change this URL in the code or via a plugin? Like some serverless plugin, I read the API document but not found any methods.