Amazon API Gateway REST API with Mapping templates for status code and parameter mapping.

API Gateway → AWS Lambda

Using mapping template to over-ride status, status code and body returned from the Lambda function.

This sample project demonstrates how to map status codes and over-ride parameters in a REST API - Lambda integration.

< 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

Deploy

sam deploy --guided --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Additional resources

Created by:

D Surya Sai

D Surya Sai

A Serverless Cloud Engineer and technical writer, who works on building efficient and scalable solutions using AWS services.

Follow on LinkedIn