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....

asked a year ago1940 views
2 Answers
1

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

answered a year ago
0
Accepted Answer

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
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions