Skip to content

JadeCara/aws_lambda_api_example

Repository files navigation

Python AWS Lambda Setup With local run Option

CI

To run this locally you can either set up a local dynamodb instance, instructions here.

Or make a couple dynamodb tables to support the back end. I added the scripts I used to create these tables in the app/awscli.sh file

To run locally:

Clone this repo.

Tip

Make sure your aws config is set up!

Create your dynamodb tables

Navigate into the project directory

To run from the command line

run sh uvicorn app.main:app --reload

To run with Docker compose

Tip

You will need access to the aws config variables through a .env file or using EXPORT from the command line

Use the Makefile command make build

Docs

Tip

Once that is running docs can be found at http://127.0.0.1:8000/docs where they are kindly generated for us by FastApi using openapi.

Making API Calls

Curl Commands for all api calls can be found there on the docs page above or in the docstrings on the routes. This build also includes the openapi.json.

About

Setting up a Users and Posts api using AWS lambda

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published