Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 resource fails in amplify push for too-long bucket name #13364

Open
2 tasks done
stuartlangridge opened this issue Oct 23, 2023 · 3 comments
Open
2 tasks done

S3 resource fails in amplify push for too-long bucket name #13364

stuartlangridge opened this issue Oct 23, 2023 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers p3 platform-push Issues related to `amplify push` storage Issues tied to the storage category

Comments

@stuartlangridge
Copy link

stuartlangridge commented Oct 23, 2023

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

v18.17.1

Amplify CLI Version

10.7.3

What operating system are you using?

Ubuntu

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No manual changes made

Describe the bug

I have created a new environment (with amplify env add) named stuartprod, and am now trying to amplify push to deploy the environment. I get the following error:

Deploying storage s3linkfiles [ ---------------------------------------- ] 0/9
	S3Bucket                       AWS::S3::Bucket                CREATE_FAILED                  Mon Oct 23 2023 14:57:56…     

🛑 The following resources failed to deploy:
Resource Name: S3Bucket (AWS::S3::Bucket)
Event Type: create
Reason: Bucket name should be between 3 and 63 characters long


🛑 Resource is not in the state stackUpdateComplete
Name: S3Bucket (AWS::S3::Bucket), Event Type: create, Reason: Bucket name should be between 3 and 63 characters long

I don't know what the bucket name that it's trying to create actually is, and I don't know how to find out. The name of the whole project is projnewcomponents. I note that in the existing environment (called staging), the name of the bucket is projnewcomponents5ddb(28 hex chars)3503-staging, which is 61 characters long. So perhaps it's trying to create projnewcomponents5ddb(28 hex chars)3503-stuartprod which would be 64 characters long and therefore too long? This is OK if so, but there really ought to be a warning about this somewhere!

Expected behavior

Either this shouldn't fail, or, if the constructed bucket name is too long, it should tell me what the failing bucket name is so I can try to resolve it.

Reproduction steps

I don't know what's causing this (although see speculation above) so it's hard to know how to reproduce it.

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.
@stuartlangridge stuartlangridge added the pending-triage Issue is pending triage label Oct 23, 2023
@ykethan
Copy link
Member

ykethan commented Oct 24, 2023

Hey @stuartlangridge, thank you for reaching out. I was able to reproduce the issue using the following steps

  1. amplify init -> named projnewcomponents
  2. amplify add storage
    observed the bucket name was greater then 63 characters as follows
    image
    amplify push fails with Reason: Bucket name should be between 3 and 63 characters long.

marking as bug.

@ykethan ykethan added bug Something isn't working storage Issues tied to the storage category platform-push Issues related to `amplify push` good first issue Good for newcomers p3 and removed pending-triage Issue is pending triage labels Oct 24, 2023
@Dhruval7878
Copy link

can someone assign me this issue please ?

@Dhruval7878
Copy link

Dhruval7878 commented Nov 11, 2023

can someone assign me this issue please ?

heii @ykethan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers p3 platform-push Issues related to `amplify push` storage Issues tied to the storage category
Projects
None yet
Development

No branches or pull requests

3 participants