ca98am79 / connect-dynamodb

DynamoDB session store for Connect
http://ca98am79.github.com/connect-dynamodb/
MIT License
144 stars 66 forks source link

aws-sdk in deployment package (aws lambda issue) #48

Closed zeuzere closed 6 years ago

zeuzere commented 6 years ago

We use claudiajs to package our functions with: claudia update --no-optional-dependencies ... (Idem: npm install --no-optional) to reduce the size of our package. As recommended by AWS to not include AWS-SDK in node_modules when deploying to lambda ...

and we notice that you install this in dependencies: "dependencies": { "aws-sdk": "", "connect": "" },

it should be in optionalDependencies: "optionalDependencies": { "aws-sdk": "*" },

It will not change anything, except that those that wish to not include this package will be able to do it... by using npm install -no-optionnal So the _nodemodules/connect-dynamodb directory will be a few Ko instead of ~30.4Mo

Small change for a huge difference, especially when sending to aws lamda

Thanks The size of the package is the only buttleneck for us now... Love your package (use it in Api-Gateway->Lambda->Dynamo) Yves Laroche

PS.: I did a pull request...

ca98am79 commented 6 years ago

thank you