エラー内容
- コマンド
コマンド
cdk deploy
- 実行例
実行例
$ cdk deploy
✨ Synthesis time: 2.26s
【スタック名】: building assets...
[0%] start: Building afe12ee13b10f5531c1f6afc434951e2965d2ce674cd6131e0e18ce24003942f:current_account-current_region
[0%] start: Building 73b36b38182339c8db1095ad5cb82c62d3a882f8791130daa61c5853831382d1:current_account-current_region
[0%] start: Building b8d48382b962cfe5964deffa29fb036f2c27568cb774cc9f3c402f30c90d8003:current_account-current_region
[33%] success: Built afe12ee13b10f5531c1f6afc434951e2965d2ce674cd6131e0e18ce24003942f:current_account-current_region
[66%] success: Built 73b36b38182339c8db1095ad5cb82c62d3a882f8791130daa61c5853831382d1:current_account-current_region
[100%] success: Built b8d48382b962cfe5964deffa29fb036f2c27568cb774cc9f3c402f30c90d8003:current_account-current_region
【スタック名】: assets built
【スタック名】: deploying...
[0%] start: Publishing afe12ee13b10f5531c1f6afc434951e2965d2ce674cd6131e0e18ce24003942f:current_account-current_region
[0%] start: Publishing 73b36b38182339c8db1095ad5cb82c62d3a882f8791130daa61c5853831382d1:current_account-current_region
[0%] start: Publishing b8d48382b962cfe5964deffa29fb036f2c27568cb774cc9f3c402f30c90d8003:current_account-current_region
[33%] fail: No bucket named 'cdk-hnb659fds-assets-【アカウントID】-【リージョン】'. Is account 【アカウントID】 bootstrapped?
[66%] fail: No bucket named 'cdk-hnb659fds-assets-【アカウントID】-【リージョン】'. Is account 【アカウントID】 bootstrapped?
[100%] fail: No bucket named 'cdk-hnb659fds-assets-【アカウントID】-【リージョン】'. Is account 【アカウントID】 bootstrapped?
❌ 【スタック名】 failed: Error: Failed to publish one or more assets. See the error messages above for more information.
at publishAssets (/usr/local/lib/node_modules/aws-cdk/lib/util/asset-publishing.ts:60:11)
at CloudFormationDeployments.publishStackAssets (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:572:7)
at CloudFormationDeployments.deployStack (/usr/local/lib/node_modules/aws-cdk/lib/api/cloudformation-deployments.ts:419:7)
at deployStack2 (/usr/local/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:264:24)
at /usr/local/lib/node_modules/aws-cdk/lib/deploy.ts:39:11
at run (/usr/local/lib/node_modules/p-queue/dist/index.js:163:29)
❌ Deployment failed: Error: Stack Deployments Failed: Error: Failed to publish one or more assets. See the error messages above for more information.
at deployStacks (/usr/local/lib/node_modules/aws-cdk/lib/deploy.ts:61:11)
at CdkToolkit.deploy (/usr/local/lib/node_modules/aws-cdk/lib/cdk-toolkit.ts:338:7)
at initCommandLine (/usr/local/lib/node_modules/aws-cdk/lib/cli.ts:364:12)
Stack Deployments Failed: Error: Failed to publish one or more assets. See the error messages above for more information.
原因
cdk deploy
コマンド実行時に S3バケットは削除されているのに CloudFormation
の CDKToolkit
スタックが残っていたため
対処法
CloudFormation
の CDKToolkit
スタックを削除する