simplistic-deployer-for-aws-lambda
v0.0.27
Published
Can be used to deploy Lambda functions if code is in src folder and index.js file.
Downloads
5
Readme
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
Then configure:
- 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 config
AWS CLI command are used by default if these variables are not set in the .deploy.env file.
SD_ZIP_PATH=<Path where the deployment zip file is to be created, can be
relative to the root of your project's repository>
SD_FUNCTION_NAME=<Name of the AWS Lambda function to deploy to>
SD_REGION=<AWS region where the Lambda function is located>
SD_AWS_ACCESS_KEY_ID=<The AWS access key id to use, optional>
SD_AWS_SECRET_ACCESS_KEY=<The AWS secret access key to use, optional>
- Deploy the Lambda function by running
deploy-lambda
It is also possible to build the zip file without deploying by running:
zip-lambda