No description
This repository has been archived on 2024-07-19. You can view files and clone it, but cannot push or open issues or pull requests.
Find a file
2022-09-03 17:52:22 -04:00
.github/workflows Migrate to Terraform (#3) 2021-03-19 13:38:54 -04:00
infrastructure Migrate to Terraform (#3) 2021-03-19 13:38:54 -04:00
script build: remove dependency on pyenv-virtualenv (#7) 2022-09-03 17:52:22 -04:00
src Initial version (#1) 2020-09-26 01:14:56 -04:00
.gitignore build: remove dependency on pyenv-virtualenv (#7) 2022-09-03 17:52:22 -04:00
.python-version Initial version (#1) 2020-09-26 01:14:56 -04:00
docker-compose.yml Initial version (#1) 2020-09-26 01:14:56 -04:00
Dockerfile Initial version (#1) 2020-09-26 01:14:56 -04:00
LICENSE Initial commit 2020-08-23 01:43:53 -04:00
README.md Migrate to Terraform (#3) 2021-03-19 13:38:54 -04:00
requirements.in Migrate to Terraform (#3) 2021-03-19 13:38:54 -04:00
requirements.txt build: remove dependency on pyenv-virtualenv (#7) 2022-09-03 17:52:22 -04:00
requirements_dev.in Migrate to Terraform (#3) 2021-03-19 13:38:54 -04:00
requirements_dev.txt build: remove dependency on pyenv-virtualenv (#7) 2022-09-03 17:52:22 -04:00
tasks.py build: remove dependency on pyenv-virtualenv (#7) 2022-09-03 17:52:22 -04:00

lambda-boilerplate

🛠 Skip the boilerplate and start building fun λ things 🛠

Lambda Boilerplate

Overview

AWS Lambdas are fun, but often the amount of boilerplate involved in getting a project off the ground hinders the fun. From setting up a local environment to writing out infrastructure templates, the overhead of Lambda-based greenfield projects can be daunting. No more. Just use this repository as a template or clone it and jump straight into the action! This repository offers a quick template your can use, full with a Docker setup for local development and invocation commands that you can use to package and deploy Lambda-based apps.

Local development

To get started, hit the bootstrap script with . script/bootstrap. This will set up a Python 3.8 virtualenv set up with some basic tools that will make your life easier.

The base Lambda handler is at src/base.py and all the Terraform configurations are in infrastructure.

Read more about Sceptre

Read more about AWS Lambda

Invocations

This template uses PyInvoke, all commands are of the format inv <command> <parameters>.

Use inv --list for the full list of commands.

Deployment

Deployment is in three steps: on first setup, you will need to make sure that your bootstrap environment is ready via inv cloud.apply bootstrap. Then, you should upload your lambdas' source with inv cloud.pack and inv cloud.push. Finally, you can deploy your application resources with inv cloud.deploy app.

Contributing

Got suggestions or improvements you'd like to make? Open a PR or an issue!

Feature requests should keep in mind that the goal of this boilerplate is to be general enough so that the cost of tailoring it to specific use cases is low.