During my practice of fllowing the AWS Cloud Development Kit (AWS CDK) script that automatically provisions container
image-based Lambda functions that perform ML inference using pre-trained Hugging Face modelsWhen using the aws cdk stack deployment,
I got some error like this:
1:45:26 AM CREATE_FAILED | AWS::S3::Bucket | StagingBucket |
As a reminder, here are the steps I was doing:
cdk bootstrap |
When I reach the cdk bootstrap I get the above error:
The error happens probably because I previously mannually removed some images on the aws ECR.
So to fix that error, first I go to the aws console and find the CloudFormation dashboard, and delete the stack called “CDKToolkit”,
shown as below
Then I went to S3 buckets in aws console, and delete the bucket named as “cdk-hnb659fds-assets-xxxxxxxxxxx-us-east-1”, as shown below:
After it’s done, I rerun cdk bootstrap, it works.