HTTP redirect using lambda handler
def lambda_handler(event, context): # Generate HTTP redirect response with 302 status code and Location header. response = { 'status': '302', 'statusDescription': 'Found', 'headers': { 'location': [{ 'key': 'Location', 'value': 'http://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html' }] } } return response
See also
- URL redirection, Subdomain redirection, Lambda@Edge: HTTP redirect using lambda handler, Redirect: HTTP status codes 3xx
- AWS CloudFront, distributions, Invalidations, Amazon CloudFront Ready,
aws cloudfront
, CloudFront Functions, Lambda@Edge, Origin Shield, Signed URL, OAI, Origin Access Control (OAC), Amazon CloudFront edge locations, cloudfront.net, invalidations, CloudFront Security Savings Bundle (CFSSB)
Advertising: