How to modify api gateway response headers and contents

0

I connected a lambda Fast API server to the API gateway. The request is mapped correctly now. I'm trying to use a response mapping template in the API gateway to manipulate the response. I'm not sure how exactly I can do it there.

Jehan
已提问 2 个月前170 查看次数
1 回答
0
已接受的回答

Hello.

The mapping template syntax is described in the following documentation:
Based on this, the response from Lambda can be processed by API Gateway and returned to the user as a response.
https://docs.aws.amazon.com/apigateway/latest/developerguide/models-mappings.html

I am using an image of a slightly older management console, but I think the following blog will be helpful for setting up.
https://medium.com/@nwosuonyedikachi/how-to-do-input-output-mappings-in-the-api-gateway-for-lambda-functions-on-the-aws-cloud-console-8f4304f25dc2

profile picture
专家
已回答 2 个月前
profile picture
专家
已审核 2 个月前
  • This worked thanks

    #set($context.requestOverride.header.header3 = $header3Value)

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则