API GW logging "Endpoint request body" in all requests, even 4xx and 5xx.

0

Customer would like to receive "Endpoint request body", in CloudWatch Logs, even on failed requests, when usage plan constraints are broken. They receive that information in status 200 request but do not in 4xx and 5xx requests.

Is this possible to configure?

AWS
feita há 3 anos1403 visualizações
1 Resposta
0
Resposta aceita

Invalid API Keys or Quota exceptions will raise errors before reaching the content validation phase of your request (as well as transformation and mappings), thus not being able to capture the payload.

Customer can still enrich their logs using Custom Access Logs instead of just using plain Execution Logs, but that won't suffice for the case of errors in the Invalid API cases.

You can check the available attributes for the $context variable for Custom Access Logging here: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-mapping-template-reference.html#context-variable-reference

AWS
MODERADOR
respondido há 3 anos

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas