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.

1 Risposta
0
Risposta accettata

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
ESPERTO
con risposta 2 mesi fa
profile picture
ESPERTO
verificato 2 mesi fa
  • This worked thanks

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

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande