- Newest
- Most votes
- Most comments
From the question it is not very clear, therefore I am asking this - Are you trying to create the Integration URL using the mapping template and wish to pass it to the backend service or modify the Endpoint URL parameter of the API method and return that URL to the caller.
Some of the points that needs to be considered are:
- You can build the Integration URL in the mapping templates using path parameters, query string parameters and headers but cannot assign this value to the API method integration URL. You can either pass this value to the backend service in form of body or headers/querystring/path parameters or by overiding the request params.
-
By default, we can only map the method request parameters to integration request parameters which is sent to backend service. Similarly, we can map only the integration response data which is returned by backend service to method response headers which would be passed to the invoker/caller. There is no direct way where we can set the integration request parameters to the method response/integration response resources to return to the API Gateway invoker.
-
If the created Integration URL is returned from the backend response, then you can map the integration response data to method response data using the mapping template configured on Integration response settings. Please refer to this article:
[+] https://docs.aws.amazon.com/apigateway/latest/developerguide/request-response-data-mappings.html
If my understanding is wrong and you are use-case is different, then can you please provide detailed information and some more details on what you want to achieve.
answered 2 years ago
Relevant content
asked 3 years ago
