3 réponses
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
If you mean for use with apigateway, you need to return a specifically formatted response.
{
"isBase64Encoded": true|false,
"statusCode": httpStatusCode,
"headers": { "headerName": "headerValue", ... },
"multiValueHeaders": { "headerName": ["headerValue", "headerValue2", ...], ... },
"body": "..."
}
répondu il y a 4 ans
0
I'm not using API gateway. I trigger Lamda using S3, and in case of error, i'm using DLQ. In DLQ message there is an attribute ErrorCode which the value is always is 200, but I want to customize this code as part of my Lambda code to publish different code for different errors
répondu il y a 4 ans
0
Ah, I see. No, that is not possible. That field is for the code that would have been returned by invoke if it were synchronous, which should be 200 most of the time, even in the case of exceptions in the user controlled lambda code. The possible values are here: https://docs.aws.amazon.com/lambda/latest/dg/API_Invoke.html#API_Invoke_Errors
répondu il y a 4 ans
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a un mois
- demandé il y a 6 mois
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 4 mois