Amazon API Gateway Regional API with mapping template to AWS Lambda

API Gateway → AWS Lambda

Create a Regional REST API with a mapping template in the integration request to pass to the lambda function.

This SAM template creates a regional REST API with a mapping template in the integration request to pass to the Lambda function.
The AWS Lambda function is written in Node.js 18. 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-mappingtemplate-lambda-nodejs

Deploy

sam deploy


Testing

Once the application is deployed, retrieve the API URL and open it in a browser page.
You can also make the request from Postman or from a terminal using the curl command.

Cleanup

Delete the stack: sam delete.

Created by:

Alice Goumain

Alice Goumain

Cloud Support Engineer in Serverless @ AWS

Follow on LinkedIn