Skip to content

dixonaws/simple-aws-restful-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

The simplest way to create a RESTFUL API with Lambda and API Gateway

You can do this from macOS, Windows, or Cloud9 in AWS. Tested with Python 3.6.6 and pip 18.1 on macOS 10.14.2, using AWS us-east-1. Make sure to create an account on aws.amazon.com.
This walkthrough uses the Chalice Serverless Microframework to create a simple API with Python3 deployed to AWS API Gateway and Lambda. No promises on Windows-based systems (sorry)!

Install and configure the AWS CLI
pip install awscli
aws configure

Create a Python virtual environment
virtualenv -p python3 venv && source venv/bin/activate

Install Chalice
pip install chalice

Create a new project
chalice new-project um-facts

Deploy to AWS
cd um-facts && chalice deploy

Test it out!
curl -X GET [your API URL]

Adjust to taste and redeploy, possibly by getting data from a DynamoDB table or by getting data from an RDS database. You could also test locally with chalice local.

About

The simplest way to create a restful API with API Gateway and Lambda (Python)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published