Can be used to deploy Lambda functions if code is in src folder and index.js file.
A script that deploys AWS Lambda functions.
Requirements:
- AWS CLI
should be setup and the configured user should have sufficient permissions to
update Lambda functions.
- Assumes a code structure of:
``
`
- node_modules/(npm packages)
- src/(code files)
- index.js
`
Files outside those listed above are ignored.
Warning
This package is currently experimental and error prone. Use it only if you
understand the code.
To install:
`
npm i -g simplistic-deployer-for-aws-lambda
aws config
Then configure:
1. Create a .deploy.env file in the root of your repository. (This file can be
ignored in your version control system). Include the following in this file.
Note that the access key and secret access key are optional as the key id and
secret access key configured via the AWS CLI command are used by
`
default if these variables are not set in the .deploy.env file.
`
SD_ZIP_PATH=
SD_FUNCTION_NAME=
SD_REGION=
SD_AWS_ACCESS_KEY_ID=
SD_AWS_SECRET_ACCESS_KEY=
`
2. Deploy the Lambda function by running
`
deploy-lambda
`
It is also possible to build the zip file without deploying by running:
``
zip-lambda