Building Lambda Apps and AWS Elastic Beanstalk

Learn about deploying Lambda Apps and AWS Elastic Beanstalk.

Building Lambda Apps

You can deploy and manage your serverless applications using the AWS Serverless Application Model (AWS SAM).

AWS SAM is a specification that prescribes the rules for expressing serverless applications on AWS. This specification aligns with the syntax used by AWS CloudFormation today and is supported natively within AWS CloudFormation as a set of resource types (referred to as “serverless resources”).

You can automate your serverless application’s release process using AWS CodePipeline and AWS CodeDeploy. You can enable your Lambda function for tracing with AWS X-Ray.

Lambda@Edge

Lambda@Edge allows you to run code across AWS locations globally without provisioning or managing servers and responding to end-users at the lowest network latency.

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)

You just upload your Node.js code to AWS Lambda and configure your function to be triggered in response to an Amazon CloudFront request. The code is then ready to execute across AWS locations globally when a request for content is received and scales with the volume of CloudFront requests globally.

Limits

Resource Limit
Memory minimum 128MB, maximum 3008MB in 64MB increments
Ephemeral disk capacity (/tmp space) per invocation 512 MB
Number of file descriptors 1024
Number of processes and threads (combined) 1024
Maximum execution duration per request 900 seconds
Concurrent executions per account 1000 (soft limit)

Operations and monitoring

Lambda automatically monitors Lambda functions and reports metrics through CloudWatch. Lambda tracks the number of requests, the latency per request, and the number of requests resulting in an error.

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.