Introduction
When you create an API with AWS API Gateway, you often need to change the shape of the data that comes in or goes out. Request and response mapping lets you change the data format so your backend and frontend can talk smoothly, even if they expect different formats.
When your frontend sends data in a format your backend does not understand.
When your backend returns data that needs to be simplified or changed before sending to the user.
When you want to add or remove fields from the data without changing your backend code.
When you want to convert data formats, like from JSON to XML or vice versa.
When you want to log or audit the data passing through your API.