SAM CLI Deployment error creating S3 Bucket

0

I'm trying to deploy the hello world app created with Quarkus following the guide (http://quarkus.io/guides/amazon-lambda-http).

Everything works fine locally (sam local start-api --template target/sam.jvm.yaml).

When I try to deploy to my aws account, I'm getting an error in the console. The command to deploy is: sam deploy -t target/sam.jvm.yaml -g

Error: Failed to create managed resources: Waiter StackCreateComplete failed: Waiter encountered a terminal failure state: For expression "Stacks[].StackStatus" we matched expected path: "ROLLBACK_COMPLETE" at least once

Looking at the AWS CloudFormation console, it looks like the S3 bucket is what is erroring out on creation:

The step is: SamCliSourceBucketBucketPolicy
The error is: Create Failed
Error Details:

The specified bucket is not valid. (Service: Amazon S3; Status Code: 400; Error Code: InvalidBucketName; Request ID: 0Z7AAGBJ59K08QWV; S3 Extended Request ID: TYpczg8AGNGy+ryR7aLanMhNautgYQ2cQC4OujAskOFZyUzBp/y87pjavD1OEUuw0D/GJdiemzk=; Proxy: null)

I've also tried to pre-create the S3 bucket and that didn't work by adding the --s3-bucket flag to the deployment command.

Anyone have any ideas on what to do next to deploy the hello world starter app to aws lambda?

Thanks,
Chris....

已提问 3 年前4653 查看次数
2 回答
1

Thank you! That was my issue and upgrading fixed it. Appreciate your reply and marked the answer as correct.

已回答 3 年前
0
已接受的回答

Facing the exact same issue with a different sam project. I found this: https://github.com/aws/aws-sam-cli/issues/3243#issuecomment-915676257

If you are on aws-sam-cli 1.30.0, that is most likely the problem.

Edited by: TOKelly on Sep 16, 2021 5:01 AM

TOKelly
已回答 3 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则