How do I create a mock integration in API Gateway to take a request to:
/products/{product}/bigFile.zip?platform={platform}&version={version}
And respond with a redirect to:
http://xyz.cloudfront.net/{product}/{platform}/{version}.zip
I've tried changing the request and response mapping templates, but I'm not sure how they're connected, since the AWS docs on mock integrations are pretty sparse. I can change the HTTP status code, but I can't get the Location
header to populate based on the query parameters.
The broader context (in case I've committed the XY problem) is that I am building an API using AWS API Gateway. One of the API endpoints serves large files that won't meet the 10s response time limit from API gateway, so I want to redirect to another CDN link.