Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 1
    I did not use CDK (only Serverless Framework) so I don't know how this exactly works, but I don't see a reason to multiply node_modules. It should be possible to create multiple functions in single project. Commented Feb 15, 2021 at 6:58
  • 1
    @JHH agree and as they want to use sdk v3 they are going to include them one way or another. I suggest they provide them to their lambda in an isolated layer and not bundle together with rest of module deps. In a separate layer they may share with other lambdas and when v3 is provided out of the box OP can either drop the layer or continue maintain specific v3 version themselves. Commented Apr 4, 2021 at 2:04
  • 3
    Is there any reason they do not include the aws-sdk v3 as a acpkage the same way they do it with v2? Commented Jul 6, 2021 at 15:58
  • 3
    The downside of always deploying a specific SDK version via layer, or otherwise, is that you lose the benefit of the AWS Lambda service auto updating the SDK dependency for you. That's a potential no-cost security benefit whose value needs to be weighed against the risk of a breaking change in the SDK. Commented Oct 22, 2021 at 15:20
  • 2
    @zrkl, AWS seem to have gone to a lot of trouble in v3 to separate out all their packages. They've always advised people to bundle up a specific SDK version rather than relying on the lambda runtime version. I'd imagine they might be intentionally not exposing v3 so that people follow this advice; afterall I'm sure it would be fairly trivial for them to just bake v3 into the lambda runtime e.g. with a Docker build. As for v2, they probably have to leave that in there for backwards compatibility. I may be wrong, maybe v3 will be part of the runtime in future, but I'm not holding my breath. Commented Jul 20, 2022 at 16:25