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

fix: s3 resource fails in amplify push for too-long bucket name #13802

Conversation

kunal-arora
Copy link

@kunal-arora kunal-arora commented May 30, 2024

Description of changes

Fix: Remove 63 character length validation

Thanks @ykethan

Issue #, if available

#13364

Description of how you validated changes

Added a unit test for it

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)
  • New AWS SDK calls or CloudFormation actions have been added to relevant test and service IAM policies
  • Pull request labels are added

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@kunal-arora kunal-arora requested a review from a team as a code owner May 30, 2024 14:42
@@ -1,8 +1,8 @@
module.exports = (value) => {
let isValid = typeof value === 'string' && value.length >= 3 && value.length <= 63 && /^[a-z0-9.-]*$/.test(value);
let isValid = typeof value === 'string' && value.length >= 3 && /^[a-z0-9.-]*$/.test(value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing!

Unfortunately, S3 has a limitation to the bucket names

The bucket name can be between 3 and 63 characters long, and can contain only lower-case characters, numbers, periods, and dashes.

Please check out here https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-trail-naming-requirements.html

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies for not looking into that first, You think the issue should be closed since bucket name rules dont allow it.

@kunal-arora kunal-arora closed this Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants