Amazon API Gateway REST edge-optimized API to AWS Lambda

API Gateway REST API → AWS Lambda

Create an edge-optimized API to AWS Lambda.

This pattern deploys an Amazon API Gateway REST Edge-Optimized API with a Lambda integration.
The AWS Lambda function is written in Python 3.9. The function returns a small message and a status code to the caller.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/apigw-rest-edge-lambda

Deploy

sam deploy


Testing

Once the application is deployed, click on the API URL provided as output.
You can also make the request from Postman or from a terminal using the curl command.

Cleanup

Delete the stack: aws cloudformation delete-stack --stack-name STACK_NAME.

Additional resources

Created by:

Alice Goumain

Alice Goumain

Cloud Support Engineer in Serverless @ AWS

Follow on LinkedIn