Created
September 25, 2020 15:51
-
-
Save bendalby82/5bdccc8f689f5248f50be27e634c8172 to your computer and use it in GitHub Desktop.
Create Node.js layer to simplify connecting AWS Lambda to PostgreSQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#https://medium.com/coinmonks/connecting-aws-lambda-node-js-to-redshift-or-postgresql-try-aws-lambda-layers-78e60c27f39b | |
#Note the name of the folder *must* be nodejs, see explanation here: | |
#https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html | |
mkdir nodejs | |
cd nodejs | |
npm init -y | |
npm install --save pg | |
cd .. | |
zip -r nodejs.zip nodejs |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment