Skip to content

Instantly share code, notes, and snippets.

@fujiwara
Created February 22, 2019 03:22
Show Gist options
  • Save fujiwara/c7bffaf3d7950726c9e83856821770e2 to your computer and use it in GitHub Desktop.
Save fujiwara/c7bffaf3d7950726c9e83856821770e2 to your computer and use it in GitHub Desktop.
Lambda Edge redirector
exports.handler = async (event, context, callback) => {
const response = {
status: "302",
statusDescription: "Found",
headers: {
location: [{
key: 'Location',
value: 'http://contents.xj-storage.jp/xcontents/AS01527/ec0b38f1/7c8b/4dbc/89e1/106de9ea3108/20190108140352250s.pdf',
}],
}
};
callback(null, response);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment