-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Support S3 URI format for package artifact #9403
Comments
Hello @zachwhaley - I believe this was just addressed by: #9380 Could you confirm that's the case? |
Oh wow, merged 4 hours ago 😄 The changes do not seem to account for Region in the old URL style, but that’s a not big deal since the new S3 URI is preferred. |
Thanks for bringing that up @zachwhaley - we should definitely support and properly handler old-style URLs with region in mind. Would you be interested in submitting a PR for that? |
Sure thing! I’ll give it a go :) |
It should be fairly easy to update the regexes to support region urls. In |
You can even replace the |
Use case description
Serverless supports downloading and using a package artifact from an S3 bucket, but it only allows the outdated global legacy path style S3 URL format (e.g.
s3.amazonaws.com/bucket/path
) which can be confusing when the AWS web console will give a URL likebucket.s3.us-west-2.amazonaws.com/path
.There are other S3 bucket URI formats.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/access-bucket-intro.html
Proposed solution
Under the hood, Serverless is just parsing this string for the bucket and path, and then making a call to AWS JS SDK
S3.getObject()
I propose Serverless should add support for the more basic and easier to parse S3 URI format:
S3://bucket-name/key-name
and docs should suggest using this format instead of the legacy format.The text was updated successfully, but these errors were encountered: