diff --git a/examples/apps/cloudfront-http-redirect/index.js b/examples/apps/cloudfront-http-redirect/index.js index b01211bc7..77a898732 100644 --- a/examples/apps/cloudfront-http-redirect/index.js +++ b/examples/apps/cloudfront-http-redirect/index.js @@ -1,18 +1,15 @@ 'use strict'; exports.handler = (event, context, callback) => { - /* - * Generate HTTP redirect response with 302 status code and Location header. - */ - const response = { - status: '302', - statusDescription: 'Found', - headers: { - location: [{ - key: 'Location', - value: 'http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html', - }], + + var response = { + "statusCode": 302, + "headers": { + "Location": "http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html" }, + "body": "{}", + "isBase64Encoded": false }; callback(null, response); }; +