Skip to content

Instantly share code, notes, and snippets.

@secretshardul
Created February 3, 2020 07:19
Show Gist options
  • Save secretshardul/c79bc7c70234135e3506fb230ced293d to your computer and use it in GitHub Desktop.
Save secretshardul/c79bc7c70234135e3506fb230ced293d to your computer and use it in GitHub Desktop.
Return back binary data with correct headers using Lambda proxy integration
exports.handler = async (event) => {
return {
statusCode: 200,
isBase64Encoded: event["isBase64Encoded"],
headers: {
"Content-Type": event["headers"]["Content-Type"]
},
body: event["body"]
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment