Home United States USA — software AWS Release Lambda@Edge, Enabling Node.js Functions To Execute At The Edge Alongside...

AWS Release Lambda@Edge, Enabling Node.js Functions To Execute At The Edge Alongside CloudFront CDN

397
0
SHARE

Amazon Web Services (AWS) have released Lambda@Edge as generally available, allowing customers to run Node.js Lambda functions “at the edge” across AWS point-of-presence locations globally, which can enable dynamic response to end users with very low latency.
Amazon Web Services (AWS) have released Lambda@Edge as generally available, allowing customers to run Node.js Lambda functions “at the edge” across AWS point-of-presence locations globally, which can enable dynamic response to end users with very low latency.
With Lambda@Edge developers upload Node.js code to AWS Lambda, Amazon’s ” serverless ” service, and Lambda automatically runs and scales code with high availability at an AWS location close to end users, which improves latency and reduces origin load. Lambda@Edge code is triggered by events from Amazon CloudFront, a global content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to end users with low latency and high transfer speeds.
Lambda@Edge is optimised for latency sensitive use cases where end users are distributed globally and (ideally) all the information required to make a decision is available at the CloudFront edge, within the function and the request. This allows developers to:
A Lambda@Edge function can be triggered in response to four different CloudFront events:
The diagram below from the AWS Lambda@Edge documentation provides a useful pictorial aid for locating event triggers during the request/response lifecycle:
Lambda@Edge developers should be familiar with the standard AWS Lambda development paradigm, and also must develop code to work within the following constraints:
There is no free tier for Lambda@Edge at this time – function duration is calculated from the time code begins executing until it returns or otherwise terminates, and customers are charged $0.00005001 for every GB-second used. As Lambda@Edge functions have a fixed 128MB of memory available per execution, the duration charge is $0.00000625125 for every 128MB-second used. Note that Lambda@Edge functions are metered at a granularity of 50ms, and not the standard AWS Lambda granularity of 100ms.
Additional information on AWS Lambda@Edge can be found Jeff Barr’s post ” Lambda@Edge – Intelligent Processing of HTTP Requests at the Edge ” on the AWS Blog, the AWS Lambda@Edge product documentation, and the developer guide .

Continue reading...