Difference between revisions of "Lambda handler"

From wikieduonline
Jump to navigation Jump to search
Line 3: Line 3:
  
 
* [[HTTP redirect using lambda_handler]] (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-examples.html#lambda-examples-http-redirect)
 
* [[HTTP redirect using lambda_handler]] (https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-examples.html#lambda-examples-http-redirect)
<pre>
+
 
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
 
</pre>
 
  
  

Revision as of 13:32, 27 August 2021

Advertising: