【AWS】使用 AWS Lambda Functions

Posted by 西维蜀黍 on 2020-09-05, Last Modified on 2021-10-17

Requirements and Restrictions on Lambda Functions

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-requirements-limits.html

Using AWS Lambda with CloudFront Lambda@Edge

https://docs.aws.amazon.com/lambda/latest/dg/lambda-edge.html

Lambda@Edge lets you run Node.js and Python Lambda functions to customize content that CloudFront delivers, executing the functions in AWS locations closer to the viewer. The functions run in response to CloudFront events, without provisioning or managing servers. You can use Lambda functions to change CloudFront requests and responses at the following points:

  • After CloudFront receives a request from a viewer (viewer request)
  • Before CloudFront forwards the request to the origin (origin request)
  • After CloudFront receives the response from the origin (origin response)
  • Before CloudFront forwards the response to the viewer (viewer response)

Customizing Content at the Edge with Lambda@Edge

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-at-the-edge.html

Reference