aws / aws-sdk-js-v3

Modularized AWS SDK for JavaScript.
Apache License 2.0
3.12k stars 578 forks source link

signature v4 support in cloudfront edge lambdas #5919

Closed dza89 closed 7 months ago

dza89 commented 8 months ago

Describe the issue

@aws-sdk/signature-v4 has been moved to @smithy/signature-v4. Cloudfront edge lambdas have native support for @aws-sdk but not for @smithy. I am confused about what i should use, or if I should include it myself.

Will edge lambdas support smithy in the future?

Links

https://www.npmjs.com/package/@aws-sdk/signature-v4

RanVaknin commented 7 months ago

Hi @dza89 ,

Thanks for reaching out. I think your question is totally valid, but we have no visibility to how Lambda provides and packages their runtime to customers.

My advice to you (which is the recommended solution from lambda) is to always provide your own application dependencies either by bundling and uploading them to lambda, or providing them as a Lambda layer, and not to rely on the dependencies provided by the lambda runtime itself.

The bundled SDK is provided as a convenience for developers building simpler functions or using the Lambda console for development.

Providing your own dependencies will not only help you with optimizing your lambda for better cold start times, it will also allow you to control which SDK version you want to use (lambda updates their provided SDK version only a couple of times a year) so you can take advantage of newer features that otherwise might not make it to Lambda for a while.

Let me know if you have any questions. Thanks, Ran~

github-actions[bot] commented 7 months ago

This issue has not received a response in 1 week. If you still think there is a problem, please leave a comment to avoid the issue from automatically closing.

github-actions[bot] commented 7 months ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.