Creates an AWS Lambda function which GETs json data from an HTTP endpoint, on a repeating periodic schedule, and puts the data into an AWS SQS queue.
This project configures AWS using the CLI with a CloudFormation/SAM template. The SQS queue must already exist.
- github.com/e-mit/aws-lambda-db creates an AWS Lambda function which receives data from a AWS SQS queue and stores it in an SQL database.
- github.com/e-mit/aws-create-db creates and configures an AWS Relational Database Service (RDS) instance running PostgreSQL.
- github.com/e-mit/aws-ec2-grafana for configuring and deploying Grafana on an EC2 instance to display a public data dashboard
Tests and linting checks run via GitHub actions after each push. Tests can be run locally (no interaction with AWS), or with AWS (cloud tests).
Run all tests and linting with local-tests.sh
These require AWS CLI authentication. Run with cloud-tests.sh
- Provide values for the environment variables listed in
example_config.sh
- Execute script
setup.sh
. This will create the resources and start the lambda. - Optional: change log level using:
./stack.sh <stack name> loglevel <log level string e.g. DEBUG>
- Stop the lambda and delete all resources using:
./stack.sh <stack name> delete
After deploying the stack, the lambda code and the packaged Python library dependencies can be updated independently, and rapidly, using the following commands:
- Lambda function update:
./stack.sh <stack name> update_function
- Python packages update:
./stack.sh <stack name> update_layer
- Optional headers to send with the request
- Optional body data to send with the request
- Optional cookie data to send with the request
- Support API authentication