Add Static Value to Query String Parameter in the Amazon API Gateway HTTP Proxy

Asked 5 months ago, Updated 5 months ago, 14 views

on the Amazon API Gateway /api/?hoge=fuga-like request
I would like to send additional Query String Parameters when relaying to external API endpoints, such as https://endpoint/?hoge=fuga&foo=bar. What should I do?
I would like to add the same additional parameters every time.When I looked into it, I couldn't find a way to map static values to QueryString by API Gateway alone.


2022-09-30 11:01

2 Answers

I don't think it's possible to change the request by API Gateway alone.


If you pass the request to Lambda and send the request to the external API with parameters attached in Lambda, I think it will be possible.

2022-09-30 11:01

I've never tried it, so it's just a guess.

In the integration request configuration, the integration type should be http, and the mapping template should be able to describe additional parameters.It's just a fixed value.

2022-09-30 11:01

If you have any answers or tips

© 2023 OneMinuteCode. All rights reserved.