3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

cdk deploy時の「fail: No bucket named」 の対処法

Posted at

エラー内容

  • コマンド
コマンド
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バケットは削除されているのに CloudFormationCDKToolkit スタックが残っていたため

image.png

対処法

CloudFormationCDKToolkit スタックを削除する

image.png

image.png

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?