Skip to content

Commit

Permalink
fix(aws-lambda): handle base64 body in AWS Lambda preset
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-bouvy committed Oct 3, 2023
1 parent 0ff72e2 commit 18f1039
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/entries/aws-lambda.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export async function handler(
headers: normalizeLambdaIncomingHeaders(event.headers),
method,
query,
body: event.body, // TODO: handle event.isBase64Encoded
body: event.isBase64Encoded ? Buffer.from(event.body, 'base64').toString('utf8') : event.body,
});

// ApiGateway v2 https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.v2
Expand Down

0 comments on commit 18f1039

Please sign in to comment.