`cdk deploy`:无法在节点 v16.14.0 中发布资产
`cdk deploy`: fails to publish asset in node v16.14.0
我正在尝试找出我无法弄清楚的模糊错误或问题的原因。我尝试使用节点 v16.14.0
和 v14.18.1
,令人惊讶的是后者每次都在相同的场景中正常工作。
我在节点 v16 中从 cdk deploy
得到的错误如下:
[50%] fail: The XML you provided was not well-formed or did not validate against our published schema
我很困惑,因为我对两个节点版本使用的是相同的部署过程。
这是我用来部署的 CDK 代码,以防有人好奇:https://github.com/rnag/rust.aws-cdk-lambda/tree/main/cdk-examples/rust-standalone
我在下面的两个节点版本中附加了 cdk deploy -vv
的终端输出。希望有人知道出了什么问题,尽管我认为这可能与我设置环境的方式有关。我在这两种情况下都做了 运行 npm -g install cdk
。我正在使用 nvm
在节点版本之间切换。
v14
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± which cdk
/Users/rnag/.nvm/versions/node/v14.18.1/bin/cdk
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± cdk deploy -vv
CDK toolkit version: 2.15.0 (build 151055e)
Command line arguments: {
_: [ 'deploy' ],
v: 2,
verbose: 2,
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,
all: false,
'build-exclude': [],
E: [],
buildExclude: [],
ci: false,
execute: true,
force: false,
f: false,
parameters: [ {} ],
'previous-parameters': true,
previousParameters: true,
logs: true,
'[=11=]': 'cdk'
}
cdk.json: {
"app": "npx ts-node --prefer-ts-exts bin/rust-standalone.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
]
}
}
merged settings: {
versionReporting: true,
pathMetadata: true,
output: 'cdk.out',
app: 'npx ts-node --prefer-ts-exts bin/rust-standalone.ts',
watch: {
include: [ '**' ],
exclude: [
'README.md',
'cdk*.json',
'**/*.d.ts',
'**/*.js',
'tsconfig.json',
'package*.json',
'yarn.lock',
'node_modules',
'test'
]
},
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ]
},
debug: false,
assetMetadata: true,
toolkitBucket: {},
staging: true,
bundlingStacks: [ '*' ],
lookups: true
}
Using CA bundle path: /Users/rnag/.ssh/ZscalerRootCertificate-2048-SHA256.pem
Determining if we're on an EC2 instance.
Does not look like an EC2 instance.
Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
Resolving default credentials
Retrieved account ID 1234567890 from disk cache
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 1234567890
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ],
'aws:cdk:enable-path-metadata': true,
'aws:cdk:enable-asset-metadata': true,
'aws:cdk:version-reporting': true,
'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
CDK_DEFAULT_REGION: 'us-east-1',
CDK_DEFAULT_ACCOUNT: '1234567890',
CDK_CONTEXT_JSON: '{"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId":true,"@aws-cdk/core:stackRelativeExports":true,"@aws-cdk/aws-rds:lowercaseDbIdentifier":true,"@aws-cdk/aws-lambda:recognizeVersionProps":true,"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021":true,"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":true,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":true,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}',
CDK_OUTDIR: 'cdk.out',
CDK_CLI_ASM_VERSION: '16.0.0',
CDK_CLI_VERSION: '2.15.0'
}
✅ Run `cargo check`: 1.75s
Building Rust code...
Cross-compile `rust-standalone`: 9.70s
✨ Synthesis time: 17.17s
Reading existing template for stack RustStandaloneStack.
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-lookup-role-1234567890-us-east-1'.
[AWS ssm 200 0.483s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[AWS cloudformation 200 0.3s 0 retries] describeStacks({ StackName: 'RustStandaloneStack' })
[AWS ssm 200 1.098s 1 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[AWS cloudformation 200 0.45s 0 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
RustStandaloneStack: deploying...
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-deploy-role-1234567890-us-east-1'.
Waiting for stack CDKToolkit to finish creating or updating...
[AWS cloudformation 200 0.487s 0 retries] describeStacks({ StackName: 'CDKToolkit' })
[AWS cloudformation 200 1.307s 1 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
[AWS ssm 200 0.215s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[0%] start: Publishing ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac:current_account-current_region
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-file-publishing-role-1234567890-us-east-1'.
[0%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 0.424s 0 retries] getBucketLocation({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[AWS s3 200 0.17s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
MaxKeys: 1
})
[AWS s3 200 0.447s 0 retries] getBucketEncryption({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[0%] cached: From cache /Users/rnag/CLionProjects/rust-aws-cdk-lambda/cdk-examples/rust-standalone/cdk.out/.cache/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[0%] upload: Upload s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 1.049s 0 retries] createMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
ContentType: 'application/zip',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[AWS s3 200 0.639s 0 retries] uploadPart({
Body: <Buffer 45 2f ef 50 27 7f 1b c6 af 77 fc 6c bd ba ce 19 65 66 e3 b3 5a 6f eb ce 6c be 63 8d cf 6c 3e ab 7f 8b eb b4 02 be 07 57 c3 35 f0 23 f8 09 dc 08 ad df ... 1087932 more bytes>,
ContentLength: 1087982,
PartNumber: 2,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: 'zkn5fIhcgZXUOfSrM1i3Z8mbIM_qpySk8xj6r28RWBhCucHWc4P8Ij_P5H8u1rnGRcy23vIBk2QbfjPsjtIenhZ.89ezKxiGhIcQpVHpuUOQjNNUWGRJWFkLhMCqXh3Pv4kkP7atb8Tf648Fl7tVpg--'
})
[AWS s3 200 1.276s 0 retries] uploadPart({
Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 62 6f 6f 74 73 74 72 61 70 ec 7d 0b 78 14 d5 dd f7 2c c9 c2 ... 5242830 more bytes>,
ContentLength: 5242880,
PartNumber: 1,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: 'zkn5fIhcgZXUOfSrM1i3Z8mbIM_qpySk8xj6r28RWBhCucHWc4P8Ij_P5H8u1rnGRcy23vIBk2QbfjPsjtIenhZ.89ezKxiGhIcQpVHpuUOQjNNUWGRJWFkLhMCqXh3Pv4kkP7atb8Tf648Fl7tVpg--'
})
[AWS s3 200 0.822s 0 retries] completeMultipartUpload({
MultipartUpload: {
Parts: [
{ ETag: '"72e38889eb268ce42fafe61b7a94ab02"', PartNumber: 1 },
{ ETag: '"aa13b0f627ce8e471a9b94de094ca30a"', PartNumber: 2 },
[length]: 2
]
},
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: 'zkn5fIhcgZXUOfSrM1i3Z8mbIM_qpySk8xj6r28RWBhCucHWc4P8Ij_P5H8u1rnGRcy23vIBk2QbfjPsjtIenhZ.89ezKxiGhIcQpVHpuUOQjNNUWGRJWFkLhMCqXh3Pv4kkP7atb8Tf648Fl7tVpg--'
})
[50%] success: Published ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac:current_account-current_region
[50%] start: Publishing ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e:current_account-current_region
Retrieved account ID 1234567890 from disk cache
[50%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json
[AWS s3 200 0.229s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: 'ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json',
MaxKeys: 1
})
[50%] upload: Upload s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json
[AWS s3 200 0.299s 0 retries] putObject({
Body: <Buffer 7b 0a 20 20 22 52 65 73 6f 75 72 63 65 73 22 3a 20 7b 0a 20 20 20 20 22 52 75 73 74 53 74 61 6e 64 61 6c 6f 6e 65 42 75 63 6b 65 74 45 32 46 44 44 39 ... 9884 more bytes>,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json',
ContentType: 'application/json',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[100%] success: Published ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e:current_account-current_region
[AWS cloudformation 200 0.224s 0 retries] describeStacks({ StackName: 'RustStandaloneStack' })
RustStandaloneStack: checking if we can skip deploy
[AWS cloudformation 200 0.457s 0 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
RustStandaloneStack: template has changed
RustStandaloneStack: deploying...
Removing existing change set with name cdk-deploy-change-set if it exists
[AWS cloudformation 200 0.203s 0 retries] deleteChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Attempting to create ChangeSet with name cdk-deploy-change-set to update stack RustStandaloneStack
RustStandaloneStack: creating CloudFormation changeset...
[AWS cloudformation 200 0.99s 1 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
[AWS cloudformation 200 0.671s 0 retries] createChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set',
ChangeSetType: 'UPDATE',
Description: 'CDK Changeset for execution eb61d4cb-559f-442d-a13b-27c440c11c69',
TemplateBody: undefined,
TemplateURL: 'https://s3.us-east-1.amazonaws.com/cdk-hnb659fds-assets-1234567890-us-east-1/ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json',
Parameters: [
{ ParameterKey: 'BootstrapVersion', UsePreviousValue: true },
[length]: 1
],
RoleARN: 'arn:aws:iam::1234567890:role/cdk-hnb659fds-cfn-exec-role-1234567890-us-east-1',
NotificationARNs: undefined,
Capabilities: [
'CAPABILITY_IAM',
'CAPABILITY_NAMED_IAM',
'CAPABILITY_AUTO_EXPAND',
[length]: 3
],
Tags: [ [length]: 0 ]
})
Initiated creation of changeset: arn:aws:cloudformation:us-east-1:1234567890:changeSet/cdk-deploy-change-set/62f53585-1758-4700-b74d-e07462b8a6e1; waiting for it to finish creating...
Waiting for changeset cdk-deploy-change-set on stack RustStandaloneStack to finish creating...
[AWS cloudformation 200 0.25s 0 retries] describeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Changeset cdk-deploy-change-set on stack RustStandaloneStack is still creating
[AWS cloudformation 200 0.212s 0 retries] describeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Changeset cdk-deploy-change-set on stack RustStandaloneStack is still creating
[AWS cloudformation 200 0.402s 0 retries] describeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Initiating execution of changeset arn:aws:cloudformation:us-east-1:1234567890:changeSet/cdk-deploy-change-set/62f53585-1758-4700-b74d-e07462b8a6e1 on stack RustStandaloneStack
[AWS cloudformation 200 0.226s 0 retries] executeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Execution of changeset arn:aws:cloudformation:us-east-1:1234567890:changeSet/cdk-deploy-change-set/62f53585-1758-4700-b74d-e07462b8a6e1 on stack RustStandaloneStack has started; waiting for the update to complete...
Waiting for stack RustStandaloneStack to finish creating or updating...
[...]
Stack RustStandaloneStack has completed updating
✅ RustStandaloneStack
✨ Deployment time: 42.16s
Stack ARN:
arn:aws:cloudformation:us-east-1:1234567890:stack/RustStandaloneStack/9e2dee40-90ea-11ec-8957-0ecc4aab847f
✨ Total time: 59.32s
v16
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± which cdk
/Users/rnag/.nvm/versions/node/v16.14.0/bin/cdk
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± cdk deploy -vv
CDK toolkit version: 2.15.0 (build 151055e)
Command line arguments: {
_: [ 'deploy' ],
v: 2,
verbose: 2,
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,
all: false,
'build-exclude': [],
E: [],
buildExclude: [],
ci: false,
execute: true,
force: false,
f: false,
parameters: [ {} ],
'previous-parameters': true,
previousParameters: true,
logs: true,
'[=12=]': 'cdk'
}
cdk.json: {
"app": "npx ts-node --prefer-ts-exts bin/rust-standalone.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
]
}
}
merged settings: {
versionReporting: true,
pathMetadata: true,
output: 'cdk.out',
app: 'npx ts-node --prefer-ts-exts bin/rust-standalone.ts',
watch: {
include: [ '**' ],
exclude: [
'README.md',
'cdk*.json',
'**/*.d.ts',
'**/*.js',
'tsconfig.json',
'package*.json',
'yarn.lock',
'node_modules',
'test'
]
},
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ]
},
debug: false,
assetMetadata: true,
toolkitBucket: {},
staging: true,
bundlingStacks: [ '*' ],
lookups: true
}
Using CA bundle path: /Users/rnag/.ssh/ZscalerRootCertificate-2048-SHA256.pem
Determining if we're on an EC2 instance.
Does not look like an EC2 instance.
Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
Resolving default credentials
Retrieved account ID 1234567890 from disk cache
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 1234567890
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ],
'aws:cdk:enable-path-metadata': true,
'aws:cdk:enable-asset-metadata': true,
'aws:cdk:version-reporting': true,
'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
CDK_DEFAULT_REGION: 'us-east-1',
CDK_DEFAULT_ACCOUNT: '1234567890',
CDK_CONTEXT_JSON: '{"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId":true,"@aws-cdk/core:stackRelativeExports":true,"@aws-cdk/aws-rds:lowercaseDbIdentifier":true,"@aws-cdk/aws-lambda:recognizeVersionProps":true,"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021":true,"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":true,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":true,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}',
CDK_OUTDIR: 'cdk.out',
CDK_CLI_ASM_VERSION: '16.0.0',
CDK_CLI_VERSION: '2.15.0'
}
✅ Run `cargo check`: 1.86s
Building Rust code...
Cross-compile `rust-standalone`: 10.26s
✨ Synthesis time: 17.23s
Reading existing template for stack RustStandaloneStack.
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-lookup-role-1234567890-us-east-1'.
[AWS ssm 200 0.734s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[AWS cloudformation 200 0.247s 0 retries] describeStacks({ StackName: 'RustStandaloneStack' })
[AWS cloudformation 200 0.994s 0 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
RustStandaloneStack: deploying...
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-deploy-role-1234567890-us-east-1'.
Waiting for stack CDKToolkit to finish creating or updating...
[AWS cloudformation 200 0.457s 0 retries] describeStacks({ StackName: 'CDKToolkit' })
[AWS cloudformation 200 2.084s 1 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
[AWS ssm 200 0.21s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[0%] start: Publishing ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac:current_account-current_region
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-file-publishing-role-1234567890-us-east-1'.
[AWS cloudformation 200 1.015s 1 retries] describeStacks({ StackName: 'CDKToolkit' })
[0%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 0.2s 0 retries] getBucketLocation({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[AWS s3 200 0.176s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
MaxKeys: 1
})
[AWS s3 200 0.162s 0 retries] getBucketEncryption({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[0%] cached: From cache /Users/rnag/CLionProjects/rust-aws-cdk-lambda/cdk-examples/rust-standalone/cdk.out/.cache/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[0%] upload: Upload s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 0.203s 0 retries] createMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
ContentType: 'application/zip',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[AWS s3 200 0.785s 1 retries] createMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
ContentType: 'application/zip',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[AWS s3 200 0.841s 0 retries] uploadPart({
Body: <Buffer 45 2f ef 50 27 7f 1b c6 af 77 fc 6c bd ba ce 19 65 66 e3 b3 5a 6f eb ce 6c be 63 8d cf 6c 3e ab 7f 8b eb b4 02 be 07 57 c3 35 f0 23 f8 09 dc 08 ad df ... 1087932 more bytes>,
ContentLength: 1087982,
PartNumber: 2,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '7asd959UN7TCrugqfia_T2yrgYLVE5DyhAPjgIjbmjMuAef33BD_CW_erOr0eDb2XJAq92fetzye.DoRkWj2nj3D9Yhy5N3aTP_B6ZbQAh7VWjRPTl5lCd8iSMjdccvgwqR7O.5H07QqQ1AYo0QNVw--'
})
[AWS s3 200 0.755s 0 retries] uploadPart({
Body: <Buffer 45 2f ef 50 27 7f 1b c6 af 77 fc 6c bd ba ce 19 65 66 e3 b3 5a 6f eb ce 6c be 63 8d cf 6c 3e ab 7f 8b eb b4 02 be 07 57 c3 35 f0 23 f8 09 dc 08 ad df ... 1087932 more bytes>,
ContentLength: 1087982,
PartNumber: 2,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
[AWS s3 200 1.383s 0 retries] uploadPart({
Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 62 6f 6f 74 73 74 72 61 70 ec 7d 0b 78 14 d5 dd f7 2c c9 c2 ... 5242830 more bytes>,
ContentLength: 5242880,
PartNumber: 1,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '7asd959UN7TCrugqfia_T2yrgYLVE5DyhAPjgIjbmjMuAef33BD_CW_erOr0eDb2XJAq92fetzye.DoRkWj2nj3D9Yhy5N3aTP_B6ZbQAh7VWjRPTl5lCd8iSMjdccvgwqR7O.5H07QqQ1AYo0QNVw--'
})
[AWS s3 400 0.195s 0 retries] completeMultipartUpload({
MultipartUpload: {
Parts: [
{ ETag: null, PartNumber: 1 },
{ ETag: '"7ec273b6eeff48c007f37b4f43953657"', PartNumber: 2 },
[length]: 2
]
},
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
[50%] fail: The XML you provided was not well-formed or did not validate against our published schema
[50%] start: Publishing 4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9:current_account-current_region
Retrieved account ID 1234567890 from disk cache
[50%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9.json
[AWS s3 204 0.186s 0 retries] abortMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
[AWS s3 200 0.183s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: '4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9.json',
MaxKeys: 1
})
[50%] found: Found s3://cdk-hnb659fds-assets-1234567890-us-east-1/4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9.json
[100%] success: Published 4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9:current_account-current_region
❌ RustStandaloneStack failed: Error: Failed to publish one or more assets. See the error messages above for more information.
at publishAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/util/asset-publishing.ts:27:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CloudFormationDeployments.publishStackAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:418:7)
at CloudFormationDeployments.deployStack (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:299:5)
at CdkToolkit.deploy (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:208:24)
at initCommandLine (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cli.ts:310:12)
Failed to publish one or more assets. See the error messages above for more information.
Error: Failed to publish one or more assets. See the error messages above for more information.
at publishAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/util/asset-publishing.ts:27:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CloudFormationDeployments.publishStackAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:418:7)
at CloudFormationDeployments.deployStack (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:299:5)
at CdkToolkit.deploy (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:208:24)
at initCommandLine (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cli.ts:310:12)
[AWS s3 404 1.431s 0 retries] uploadPart({
Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 62 6f 6f 74 73 74 72 61 70 ec 7d 0b 78 14 d5 dd f7 2c c9 c2 ... 5242830 more bytes>,
ContentLength: 5242880,
PartNumber: 1,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
您现在可能已经解决了这个问题,但我正在为其他访问者发帖。我找到了这个似乎相关的其他页面。它至少为我解决了:https://github.com/aws/aws-cdk/issues/19287
从我在你和我的 CDK 详细日志中看到的是这个关键块:
MultipartUpload: {
Parts: [
{ ETag: null, PartNumber: 1 },
{ ETag: '"7ec273b6eeff48c007f37b4f43953657"', PartNumber: 2 },
[length]: 2
]
},
根据我在该页面和其他地方的评论中读到的内容,要使用来自 AWS SDK 的 node.js createMultipartUpload() 命令,每个部分都必须具有指定的 ETag 值。然而,出于某种原因,node.js v16.14.0 似乎将最后一部分的 ETag 保留为 'null'。 (触发此问题的我的 CDK 上传文件分为三个部分,只有最后一部分指定了 ETag 值。)
按照该页面上的建议将我的 node.js 版本回滚到 v16.3.0,我的 CDK 部署通过正确插入 ETag 值正常运行。
这可能与本地配置有关,但更改 node.js 版本似乎可以始终如一地解决问题。如果有人找到支持所有 node.js 版本的修复程序,请在此处更新以供其他人找到。
我正在尝试找出我无法弄清楚的模糊错误或问题的原因。我尝试使用节点 v16.14.0
和 v14.18.1
,令人惊讶的是后者每次都在相同的场景中正常工作。
我在节点 v16 中从 cdk deploy
得到的错误如下:
[50%] fail: The XML you provided was not well-formed or did not validate against our published schema
我很困惑,因为我对两个节点版本使用的是相同的部署过程。 这是我用来部署的 CDK 代码,以防有人好奇:https://github.com/rnag/rust.aws-cdk-lambda/tree/main/cdk-examples/rust-standalone
我在下面的两个节点版本中附加了 cdk deploy -vv
的终端输出。希望有人知道出了什么问题,尽管我认为这可能与我设置环境的方式有关。我在这两种情况下都做了 运行 npm -g install cdk
。我正在使用 nvm
在节点版本之间切换。
v14
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± which cdk
/Users/rnag/.nvm/versions/node/v14.18.1/bin/cdk
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± cdk deploy -vv
CDK toolkit version: 2.15.0 (build 151055e)
Command line arguments: {
_: [ 'deploy' ],
v: 2,
verbose: 2,
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,
all: false,
'build-exclude': [],
E: [],
buildExclude: [],
ci: false,
execute: true,
force: false,
f: false,
parameters: [ {} ],
'previous-parameters': true,
previousParameters: true,
logs: true,
'[=11=]': 'cdk'
}
cdk.json: {
"app": "npx ts-node --prefer-ts-exts bin/rust-standalone.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
]
}
}
merged settings: {
versionReporting: true,
pathMetadata: true,
output: 'cdk.out',
app: 'npx ts-node --prefer-ts-exts bin/rust-standalone.ts',
watch: {
include: [ '**' ],
exclude: [
'README.md',
'cdk*.json',
'**/*.d.ts',
'**/*.js',
'tsconfig.json',
'package*.json',
'yarn.lock',
'node_modules',
'test'
]
},
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ]
},
debug: false,
assetMetadata: true,
toolkitBucket: {},
staging: true,
bundlingStacks: [ '*' ],
lookups: true
}
Using CA bundle path: /Users/rnag/.ssh/ZscalerRootCertificate-2048-SHA256.pem
Determining if we're on an EC2 instance.
Does not look like an EC2 instance.
Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
Resolving default credentials
Retrieved account ID 1234567890 from disk cache
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 1234567890
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ],
'aws:cdk:enable-path-metadata': true,
'aws:cdk:enable-asset-metadata': true,
'aws:cdk:version-reporting': true,
'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
CDK_DEFAULT_REGION: 'us-east-1',
CDK_DEFAULT_ACCOUNT: '1234567890',
CDK_CONTEXT_JSON: '{"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId":true,"@aws-cdk/core:stackRelativeExports":true,"@aws-cdk/aws-rds:lowercaseDbIdentifier":true,"@aws-cdk/aws-lambda:recognizeVersionProps":true,"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021":true,"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":true,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":true,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}',
CDK_OUTDIR: 'cdk.out',
CDK_CLI_ASM_VERSION: '16.0.0',
CDK_CLI_VERSION: '2.15.0'
}
✅ Run `cargo check`: 1.75s
Building Rust code...
Cross-compile `rust-standalone`: 9.70s
✨ Synthesis time: 17.17s
Reading existing template for stack RustStandaloneStack.
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-lookup-role-1234567890-us-east-1'.
[AWS ssm 200 0.483s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[AWS cloudformation 200 0.3s 0 retries] describeStacks({ StackName: 'RustStandaloneStack' })
[AWS ssm 200 1.098s 1 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[AWS cloudformation 200 0.45s 0 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
RustStandaloneStack: deploying...
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-deploy-role-1234567890-us-east-1'.
Waiting for stack CDKToolkit to finish creating or updating...
[AWS cloudformation 200 0.487s 0 retries] describeStacks({ StackName: 'CDKToolkit' })
[AWS cloudformation 200 1.307s 1 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
[AWS ssm 200 0.215s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[0%] start: Publishing ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac:current_account-current_region
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-file-publishing-role-1234567890-us-east-1'.
[0%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 0.424s 0 retries] getBucketLocation({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[AWS s3 200 0.17s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
MaxKeys: 1
})
[AWS s3 200 0.447s 0 retries] getBucketEncryption({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[0%] cached: From cache /Users/rnag/CLionProjects/rust-aws-cdk-lambda/cdk-examples/rust-standalone/cdk.out/.cache/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[0%] upload: Upload s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 1.049s 0 retries] createMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
ContentType: 'application/zip',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[AWS s3 200 0.639s 0 retries] uploadPart({
Body: <Buffer 45 2f ef 50 27 7f 1b c6 af 77 fc 6c bd ba ce 19 65 66 e3 b3 5a 6f eb ce 6c be 63 8d cf 6c 3e ab 7f 8b eb b4 02 be 07 57 c3 35 f0 23 f8 09 dc 08 ad df ... 1087932 more bytes>,
ContentLength: 1087982,
PartNumber: 2,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: 'zkn5fIhcgZXUOfSrM1i3Z8mbIM_qpySk8xj6r28RWBhCucHWc4P8Ij_P5H8u1rnGRcy23vIBk2QbfjPsjtIenhZ.89ezKxiGhIcQpVHpuUOQjNNUWGRJWFkLhMCqXh3Pv4kkP7atb8Tf648Fl7tVpg--'
})
[AWS s3 200 1.276s 0 retries] uploadPart({
Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 62 6f 6f 74 73 74 72 61 70 ec 7d 0b 78 14 d5 dd f7 2c c9 c2 ... 5242830 more bytes>,
ContentLength: 5242880,
PartNumber: 1,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: 'zkn5fIhcgZXUOfSrM1i3Z8mbIM_qpySk8xj6r28RWBhCucHWc4P8Ij_P5H8u1rnGRcy23vIBk2QbfjPsjtIenhZ.89ezKxiGhIcQpVHpuUOQjNNUWGRJWFkLhMCqXh3Pv4kkP7atb8Tf648Fl7tVpg--'
})
[AWS s3 200 0.822s 0 retries] completeMultipartUpload({
MultipartUpload: {
Parts: [
{ ETag: '"72e38889eb268ce42fafe61b7a94ab02"', PartNumber: 1 },
{ ETag: '"aa13b0f627ce8e471a9b94de094ca30a"', PartNumber: 2 },
[length]: 2
]
},
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: 'zkn5fIhcgZXUOfSrM1i3Z8mbIM_qpySk8xj6r28RWBhCucHWc4P8Ij_P5H8u1rnGRcy23vIBk2QbfjPsjtIenhZ.89ezKxiGhIcQpVHpuUOQjNNUWGRJWFkLhMCqXh3Pv4kkP7atb8Tf648Fl7tVpg--'
})
[50%] success: Published ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac:current_account-current_region
[50%] start: Publishing ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e:current_account-current_region
Retrieved account ID 1234567890 from disk cache
[50%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json
[AWS s3 200 0.229s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: 'ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json',
MaxKeys: 1
})
[50%] upload: Upload s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json
[AWS s3 200 0.299s 0 retries] putObject({
Body: <Buffer 7b 0a 20 20 22 52 65 73 6f 75 72 63 65 73 22 3a 20 7b 0a 20 20 20 20 22 52 75 73 74 53 74 61 6e 64 61 6c 6f 6e 65 42 75 63 6b 65 74 45 32 46 44 44 39 ... 9884 more bytes>,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json',
ContentType: 'application/json',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[100%] success: Published ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e:current_account-current_region
[AWS cloudformation 200 0.224s 0 retries] describeStacks({ StackName: 'RustStandaloneStack' })
RustStandaloneStack: checking if we can skip deploy
[AWS cloudformation 200 0.457s 0 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
RustStandaloneStack: template has changed
RustStandaloneStack: deploying...
Removing existing change set with name cdk-deploy-change-set if it exists
[AWS cloudformation 200 0.203s 0 retries] deleteChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Attempting to create ChangeSet with name cdk-deploy-change-set to update stack RustStandaloneStack
RustStandaloneStack: creating CloudFormation changeset...
[AWS cloudformation 200 0.99s 1 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
[AWS cloudformation 200 0.671s 0 retries] createChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set',
ChangeSetType: 'UPDATE',
Description: 'CDK Changeset for execution eb61d4cb-559f-442d-a13b-27c440c11c69',
TemplateBody: undefined,
TemplateURL: 'https://s3.us-east-1.amazonaws.com/cdk-hnb659fds-assets-1234567890-us-east-1/ac7372a44556a42380bfb39940b5b5b68914a6a9f356c4ca28cb7e49d01db87e.json',
Parameters: [
{ ParameterKey: 'BootstrapVersion', UsePreviousValue: true },
[length]: 1
],
RoleARN: 'arn:aws:iam::1234567890:role/cdk-hnb659fds-cfn-exec-role-1234567890-us-east-1',
NotificationARNs: undefined,
Capabilities: [
'CAPABILITY_IAM',
'CAPABILITY_NAMED_IAM',
'CAPABILITY_AUTO_EXPAND',
[length]: 3
],
Tags: [ [length]: 0 ]
})
Initiated creation of changeset: arn:aws:cloudformation:us-east-1:1234567890:changeSet/cdk-deploy-change-set/62f53585-1758-4700-b74d-e07462b8a6e1; waiting for it to finish creating...
Waiting for changeset cdk-deploy-change-set on stack RustStandaloneStack to finish creating...
[AWS cloudformation 200 0.25s 0 retries] describeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Changeset cdk-deploy-change-set on stack RustStandaloneStack is still creating
[AWS cloudformation 200 0.212s 0 retries] describeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Changeset cdk-deploy-change-set on stack RustStandaloneStack is still creating
[AWS cloudformation 200 0.402s 0 retries] describeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Initiating execution of changeset arn:aws:cloudformation:us-east-1:1234567890:changeSet/cdk-deploy-change-set/62f53585-1758-4700-b74d-e07462b8a6e1 on stack RustStandaloneStack
[AWS cloudformation 200 0.226s 0 retries] executeChangeSet({
StackName: 'RustStandaloneStack',
ChangeSetName: 'cdk-deploy-change-set'
})
Execution of changeset arn:aws:cloudformation:us-east-1:1234567890:changeSet/cdk-deploy-change-set/62f53585-1758-4700-b74d-e07462b8a6e1 on stack RustStandaloneStack has started; waiting for the update to complete...
Waiting for stack RustStandaloneStack to finish creating or updating...
[...]
Stack RustStandaloneStack has completed updating
✅ RustStandaloneStack
✨ Deployment time: 42.16s
Stack ARN:
arn:aws:cloudformation:us-east-1:1234567890:stack/RustStandaloneStack/9e2dee40-90ea-11ec-8957-0ecc4aab847f
✨ Total time: 59.32s
v16
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± which cdk
/Users/rnag/.nvm/versions/node/v16.14.0/bin/cdk
✘ rust-standalone 0.4.0-support-compile-time-features-and-env-vars ± cdk deploy -vv
CDK toolkit version: 2.15.0 (build 151055e)
Command line arguments: {
_: [ 'deploy' ],
v: 2,
verbose: 2,
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,
all: false,
'build-exclude': [],
E: [],
buildExclude: [],
ci: false,
execute: true,
force: false,
f: false,
parameters: [ {} ],
'previous-parameters': true,
previousParameters: true,
logs: true,
'[=12=]': 'cdk'
}
cdk.json: {
"app": "npx ts-node --prefer-ts-exts bin/rust-standalone.ts",
"watch": {
"include": [
"**"
],
"exclude": [
"README.md",
"cdk*.json",
"**/*.d.ts",
"**/*.js",
"tsconfig.json",
"package*.json",
"yarn.lock",
"node_modules",
"test"
]
},
"context": {
"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId": true,
"@aws-cdk/core:stackRelativeExports": true,
"@aws-cdk/aws-rds:lowercaseDbIdentifier": true,
"@aws-cdk/aws-lambda:recognizeVersionProps": true,
"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021": true,
"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver": true,
"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName": true,
"@aws-cdk/core:target-partitions": [
"aws",
"aws-cn"
]
}
}
merged settings: {
versionReporting: true,
pathMetadata: true,
output: 'cdk.out',
app: 'npx ts-node --prefer-ts-exts bin/rust-standalone.ts',
watch: {
include: [ '**' ],
exclude: [
'README.md',
'cdk*.json',
'**/*.d.ts',
'**/*.js',
'tsconfig.json',
'package*.json',
'yarn.lock',
'node_modules',
'test'
]
},
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ]
},
debug: false,
assetMetadata: true,
toolkitBucket: {},
staging: true,
bundlingStacks: [ '*' ],
lookups: true
}
Using CA bundle path: /Users/rnag/.ssh/ZscalerRootCertificate-2048-SHA256.pem
Determining if we're on an EC2 instance.
Does not look like an EC2 instance.
Toolkit stack: CDKToolkit
Setting "CDK_DEFAULT_REGION" environment variable to us-east-1
Resolving default credentials
Retrieved account ID 1234567890 from disk cache
Setting "CDK_DEFAULT_ACCOUNT" environment variable to 1234567890
context: {
'@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId': true,
'@aws-cdk/core:stackRelativeExports': true,
'@aws-cdk/aws-rds:lowercaseDbIdentifier': true,
'@aws-cdk/aws-lambda:recognizeVersionProps': true,
'@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021': true,
'@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver': true,
'@aws-cdk/aws-ec2:uniqueImdsv2TemplateName': true,
'@aws-cdk/core:target-partitions': [ 'aws', 'aws-cn' ],
'aws:cdk:enable-path-metadata': true,
'aws:cdk:enable-asset-metadata': true,
'aws:cdk:version-reporting': true,
'aws:cdk:bundling-stacks': [ '*' ]
}
outdir: cdk.out
env: {
CDK_DEFAULT_REGION: 'us-east-1',
CDK_DEFAULT_ACCOUNT: '1234567890',
CDK_CONTEXT_JSON: '{"@aws-cdk/aws-apigateway:usagePlanKeyOrderInsensitiveId":true,"@aws-cdk/core:stackRelativeExports":true,"@aws-cdk/aws-rds:lowercaseDbIdentifier":true,"@aws-cdk/aws-lambda:recognizeVersionProps":true,"@aws-cdk/aws-cloudfront:defaultSecurityPolicyTLSv1.2_2021":true,"@aws-cdk-containers/ecs-service-extensions:enableDefaultLogDriver":true,"@aws-cdk/aws-ec2:uniqueImdsv2TemplateName":true,"@aws-cdk/core:target-partitions":["aws","aws-cn"],"aws:cdk:enable-path-metadata":true,"aws:cdk:enable-asset-metadata":true,"aws:cdk:version-reporting":true,"aws:cdk:bundling-stacks":["*"]}',
CDK_OUTDIR: 'cdk.out',
CDK_CLI_ASM_VERSION: '16.0.0',
CDK_CLI_VERSION: '2.15.0'
}
✅ Run `cargo check`: 1.86s
Building Rust code...
Cross-compile `rust-standalone`: 10.26s
✨ Synthesis time: 17.23s
Reading existing template for stack RustStandaloneStack.
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-lookup-role-1234567890-us-east-1'.
[AWS ssm 200 0.734s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[AWS cloudformation 200 0.247s 0 retries] describeStacks({ StackName: 'RustStandaloneStack' })
[AWS cloudformation 200 0.994s 0 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
RustStandaloneStack: deploying...
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-deploy-role-1234567890-us-east-1'.
Waiting for stack CDKToolkit to finish creating or updating...
[AWS cloudformation 200 0.457s 0 retries] describeStacks({ StackName: 'CDKToolkit' })
[AWS cloudformation 200 2.084s 1 retries] getTemplate({ StackName: 'RustStandaloneStack', TemplateStage: 'Original' })
[AWS ssm 200 0.21s 0 retries] getParameter({ Name: '/cdk-bootstrap/hnb659fds/version' })
[0%] start: Publishing ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac:current_account-current_region
Retrieved account ID 1234567890 from disk cache
Assuming role 'arn:aws:iam::1234567890:role/cdk-hnb659fds-file-publishing-role-1234567890-us-east-1'.
[AWS cloudformation 200 1.015s 1 retries] describeStacks({ StackName: 'CDKToolkit' })
[0%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 0.2s 0 retries] getBucketLocation({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[AWS s3 200 0.176s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
MaxKeys: 1
})
[AWS s3 200 0.162s 0 retries] getBucketEncryption({ Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1' })
[0%] cached: From cache /Users/rnag/CLionProjects/rust-aws-cdk-lambda/cdk-examples/rust-standalone/cdk.out/.cache/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[0%] upload: Upload s3://cdk-hnb659fds-assets-1234567890-us-east-1/ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip
[AWS s3 200 0.203s 0 retries] createMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
ContentType: 'application/zip',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[AWS s3 200 0.785s 1 retries] createMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
ContentType: 'application/zip',
ServerSideEncryption: 'aws:kms',
SSEKMSKeyId: undefined
})
[AWS s3 200 0.841s 0 retries] uploadPart({
Body: <Buffer 45 2f ef 50 27 7f 1b c6 af 77 fc 6c bd ba ce 19 65 66 e3 b3 5a 6f eb ce 6c be 63 8d cf 6c 3e ab 7f 8b eb b4 02 be 07 57 c3 35 f0 23 f8 09 dc 08 ad df ... 1087932 more bytes>,
ContentLength: 1087982,
PartNumber: 2,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '7asd959UN7TCrugqfia_T2yrgYLVE5DyhAPjgIjbmjMuAef33BD_CW_erOr0eDb2XJAq92fetzye.DoRkWj2nj3D9Yhy5N3aTP_B6ZbQAh7VWjRPTl5lCd8iSMjdccvgwqR7O.5H07QqQ1AYo0QNVw--'
})
[AWS s3 200 0.755s 0 retries] uploadPart({
Body: <Buffer 45 2f ef 50 27 7f 1b c6 af 77 fc 6c bd ba ce 19 65 66 e3 b3 5a 6f eb ce 6c be 63 8d cf 6c 3e ab 7f 8b eb b4 02 be 07 57 c3 35 f0 23 f8 09 dc 08 ad df ... 1087932 more bytes>,
ContentLength: 1087982,
PartNumber: 2,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
[AWS s3 200 1.383s 0 retries] uploadPart({
Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 62 6f 6f 74 73 74 72 61 70 ec 7d 0b 78 14 d5 dd f7 2c c9 c2 ... 5242830 more bytes>,
ContentLength: 5242880,
PartNumber: 1,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '7asd959UN7TCrugqfia_T2yrgYLVE5DyhAPjgIjbmjMuAef33BD_CW_erOr0eDb2XJAq92fetzye.DoRkWj2nj3D9Yhy5N3aTP_B6ZbQAh7VWjRPTl5lCd8iSMjdccvgwqR7O.5H07QqQ1AYo0QNVw--'
})
[AWS s3 400 0.195s 0 retries] completeMultipartUpload({
MultipartUpload: {
Parts: [
{ ETag: null, PartNumber: 1 },
{ ETag: '"7ec273b6eeff48c007f37b4f43953657"', PartNumber: 2 },
[length]: 2
]
},
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
[50%] fail: The XML you provided was not well-formed or did not validate against our published schema
[50%] start: Publishing 4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9:current_account-current_region
Retrieved account ID 1234567890 from disk cache
[50%] check: Check s3://cdk-hnb659fds-assets-1234567890-us-east-1/4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9.json
[AWS s3 204 0.186s 0 retries] abortMultipartUpload({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
[AWS s3 200 0.183s 0 retries] listObjectsV2({
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Prefix: '4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9.json',
MaxKeys: 1
})
[50%] found: Found s3://cdk-hnb659fds-assets-1234567890-us-east-1/4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9.json
[100%] success: Published 4deda35e5537c9624f414071740afcedfde6d03a99970eed4f8620c2bf3d8ef9:current_account-current_region
❌ RustStandaloneStack failed: Error: Failed to publish one or more assets. See the error messages above for more information.
at publishAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/util/asset-publishing.ts:27:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CloudFormationDeployments.publishStackAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:418:7)
at CloudFormationDeployments.deployStack (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:299:5)
at CdkToolkit.deploy (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:208:24)
at initCommandLine (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cli.ts:310:12)
Failed to publish one or more assets. See the error messages above for more information.
Error: Failed to publish one or more assets. See the error messages above for more information.
at publishAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/util/asset-publishing.ts:27:11)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at CloudFormationDeployments.publishStackAssets (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:418:7)
at CloudFormationDeployments.deployStack (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:299:5)
at CdkToolkit.deploy (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:208:24)
at initCommandLine (/Users/rnag/.nvm/versions/node/v16.14.0/lib/node_modules/aws-cdk/lib/cli.ts:310:12)
[AWS s3 404 1.431s 0 retries] uploadPart({
Body: <Buffer 50 4b 03 04 14 00 08 00 08 00 00 00 21 00 00 00 00 00 00 00 00 00 00 00 00 00 09 00 00 00 62 6f 6f 74 73 74 72 61 70 ec 7d 0b 78 14 d5 dd f7 2c c9 c2 ... 5242830 more bytes>,
ContentLength: 5242880,
PartNumber: 1,
Bucket: 'cdk-hnb659fds-assets-1234567890-us-east-1',
Key: 'ac3d55bd904cf4bc92553e6549bf6e7e181c18ad7ddba14bf7017ec16962e1ac.zip',
UploadId: '9ebmuStsJJEWfFRw2NXuEELkeaq5pu1.2HHcUy6XQcL_WODrog_6HzrsI_uqzN3UkKXu.tJLtVaqQW.qVT3p1h8mW4u9iSc6XzlJHp_9QzhjcwF7QlHgs560pLEvMU54eZjnXFOTekhgXHZWESJfDg--'
})
您现在可能已经解决了这个问题,但我正在为其他访问者发帖。我找到了这个似乎相关的其他页面。它至少为我解决了:https://github.com/aws/aws-cdk/issues/19287
从我在你和我的 CDK 详细日志中看到的是这个关键块:
MultipartUpload: {
Parts: [
{ ETag: null, PartNumber: 1 },
{ ETag: '"7ec273b6eeff48c007f37b4f43953657"', PartNumber: 2 },
[length]: 2
]
},
根据我在该页面和其他地方的评论中读到的内容,要使用来自 AWS SDK 的 node.js createMultipartUpload() 命令,每个部分都必须具有指定的 ETag 值。然而,出于某种原因,node.js v16.14.0 似乎将最后一部分的 ETag 保留为 'null'。 (触发此问题的我的 CDK 上传文件分为三个部分,只有最后一部分指定了 ETag 值。)
按照该页面上的建议将我的 node.js 版本回滚到 v16.3.0,我的 CDK 部署通过正确插入 ETag 值正常运行。
这可能与本地配置有关,但更改 node.js 版本似乎可以始终如一地解决问题。如果有人找到支持所有 node.js 版本的修复程序,请在此处更新以供其他人找到。