I am quite new in trying to develop lambdas with NodeJs, so this question might sound silly.
One of the limitations of lambdas is the size of the function / dependencies (250 MB) and I was wondering if aws-sdk (which has >45 MB)can be treated as a dev-dependency since it occupies 1/5 of the total size of a lambda.
I understand that this is required during development, but is it not the case that this already exists in the lambda container once deployed to AWS?
Any suggestion would help as all the articles that I browsed seem to install it as a prod dependency.
Absolutely, aws-sdk is available by default as an npm dependency inside lambda containers, so if you leave it as a development dependency, your code will still work inside lambda.
Here you can see which lambda containers contain which version of the AWS SDK. So in case you really need a specific version or one that is not yet loaded in the lambda containers, you can include your own manually.