Skip to content

Latest commit

 

History

History
39 lines (33 loc) · 966 Bytes

README.md

File metadata and controls

39 lines (33 loc) · 966 Bytes

python-lambda-template

AWS Lambda template to use with Python

Requirements

  • Python ~3.9 (latest version supported by AWS Lambda)
  • Poetry (local dependency to package management)
  • Serverless Framework (local dependency to run locally)

Run

Install

  1. Install Poetry
  2. Install Serverless Framework
  3. Install serverless plugins
serverless plugin install -n serverless-offline
  1. Create a virtual environment with Python 3.9 and activate it
python3.9 -m venv .env
source .env/bin/activate
  1. Install the project dependencies with the local test packages
poetry install --with dev

Running Locally

This project uses Serverless Framework to run locally.

sls offline start --verbose

Running Tests

source .env/bin/activate
pytest tests/