Repository navigation
Add support for S3 hosted package artifacts - #6196
Conversation
191dc33 to
53bce23
Compare
53bce23 to
e21f555
Compare
e21f555 to
a3afa64
Compare
a3afa64 to
a02b31e
Compare
medikoo
left a comment
There was a problem hiding this comment.
LGTM!
Still, maybe it'll be good to configure an integration test, that covers S3 artifact download?
|
Thanks @medikoo 👍
Yes, that sounds like a good idea. Let's add that integration test to the list and work on it in a separate PR. |
|
Minor issue. A URL like https://bucket01.s3.amazonaws.com/packages/service01.zip will work, but https://bucket01.s3.amazonaws.com/service01.zip will not due to The S3 path-style naming, which this seems to assume, is being deprecated. |
What did you implement:
Adds support for package artifacts hosted on S3.
Closes #5315
One can now point to package artifacts hosted on S3.
How did you implement it:
The first implementation replaced the
Codeproperty of the Lambda function to point to the S3 artifact. However since theartifactFilePathtraces through the whole codebase it's pretty much guaranteed that we break something if we try to mitigate checks related to the presence of theartifactin the givenartifactFilePath.The second iteration (the one implemented here) downloads the
.zipfile from S3 and sets theartifactFilePathon the function-level. This way we touch minimal code and Serverless does it's thing as if you're using the regularpackageconfiguration.How can we verify it:
Create a S3 bucket, upload a deployment artifact (e.g. previously created via
serverless package), the followingserverless.ymlbelow where you replace the Object URL and runserverless deploy.1st service with a package-wide artifact
2nd service with a function-wide artifact
Todos:
Is this ready for review?: YES
Is it a breaking change?: NO