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
demandé il y a 2 mois172 vues
1 réponse
0
Réponse acceptée

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
EXPERT
répondu il y a 2 mois
profile picture
EXPERT
vérifié il y a 2 mois
  • This worked thanks

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

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions