andrew-templeton / cfn-lambda

CloudFormation custom resource helper for Lambda Node.js runtime
MIT License
82 stars 22 forks source link

Is it possible to avoid the aws-sdk dependency? #45

Open erezrokah opened 5 years ago

erezrokah commented 5 years ago

First, thank you for this great library!

Currently the index.js exports the deploy function which in its turn requires the aws-sdk. This creates quite a (unnecessarily) big package to deploy and confuses dependency resolution tools (like Webpack).

Is there a way to just use the handler factory without requiring the aws-sdk?

ankon commented 3 years ago

The aws-sdk should be installed on a NodeJS Lambda runtime, so shouldn't you be able to just exclude it from getting bundled? (https://docs.aws.amazon.com/lambda/latest/dg/lambda-nodejs.html)