HTTP redirect using lambda handler
Jump to navigation
Jump to search
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
Related[edit]
See also[edit]
- 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: