AWS Error Proxy integrations cannot be configured to transform responses
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.
When working with AWS API Gateway, developers can sometimes encounter the error: "Proxy integrations cannot be configured to transform responses." This error is tied to how AWS API Gateway handles integration types, particularly when it comes to transforming HTTP responses. Misunderstanding how proxy integrations work in the API Gateway can lead to runtime issues and roadblocks in deployment.
Understanding AWS API Gateway Integrations
Before diving into the specifics of the error, it's important to grasp the integration methods provided by AWS API Gateway:
- AWS_PROXY (Lambda Proxy Integration): This approach allows AWS Lambda functions to handle the HTTP requests completely. In this mode, the Lambda function must handle both request parsing and response formatting.
- AWS (Lambda Custom Integration): The API Gateway can specify how the request data is passed to the Lambda function and how responses are transformed before being returned to a client.
- HTTP_PROXY (HTTP Proxy Integration): Similar to
AWS_PROXY, this method forwards requests directly to a backend HTTP endpoint. - HTTP Custom Integration: Offers the ability to intercept and transform requests and responses between the API Gateway and the backend HTTP endpoint.
Proxy Integration vs. Custom Integration
The fundamental difference between these integration types lies in where and how the transformation and processing of HTTP requests and responses occur.
- Proxy Integration: Directly passes requests and responses between the Gateway and integration endpoint with minimal interference. This is efficient for passthrough processing but limits custom transformations.
- Custom Integration: Allows for request/response processing and transformation using mapping templates in API Gateway.
Root Cause of the Error
The error "Proxy integrations cannot be configured to transform responses" arises when there is an attempt to apply response transformation configurations using integration response templates (or to modify status codes) on an API with Proxy Integration.
Technical Explanation
In Proxy Integrations, the API Gateway simply acts as a conduit, relaying the entire HTTP request and response as-is. Because of this pass-through behavior, response transformations defined in the API Gateway, such as mapping templates, cannot be applied. Any such transformation logic should be managed at the integration endpoint itself (e.g., within a Lambda function or another infrastructure).
Example Scenario
Suppose you have a Lambda function configured with AWS_PROXY integration, intending for API Gateway to transform the JSON response into a different format using a mapping template. Because the integration type is PROXY, any specified response mappings in the API Gateway configuration are ignored, resulting in the given error.
Related reading
- AWS Eventbridge how do I run a scheduled rule manually in order to test it?
- AWS Fargate ResourceInitializationError unable to pull secrets or registry auth pull command failed signal killed
- AWS Glue Crawler Not Creating Table
- AWS Glue get job_id from within the script using pyspark
- AWS Lambda API Gateway error Malformed Lambda proxy response
- AWS Lambda connecting to Internet
- AWS How to disable all services?
- AWS how to fix S3 event replacing space with '' sign in object key names in json

System Design Fundamentals
Build a strong foundation in designing scalable, reliable distributed systems.
View the courseTrack what you have practised
A free account saves your progress, solutions and study plan across every problem on Codemia.
System Design practice on Codemia
Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.