Overview
AWS Lambda is a serverless compute service that executes provided code on fully managed infrastructure. It is classified as a Function-as-a-Service (FaaS), which means that everything, except your code, is managed for you.
That enables the many benefits:
- Automatic Scaling
- Billed for Executing Code; Not Billed for Idle Time
- Built-in Fault Tolerance
Serverless
Serverless computing allows you to build and run applications and services without thinking about servers. With serverless computing, your application still runs on servers, but all the server management is done by AWS.
- Better Availability
- Better Performance
- No Manual Scaling
- No Patching
- No Wasted Capacity
https://aws.amazon.com/lambda/faqs/
Configuration
Layers
Additional code that can be loaded into your function without the need to package that code along with your deployment package. This can be really useful if you have a lot of functions that rely on the same dependencies.
https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html
Memory
Controls the amount of memory a function can use.
Value must be between 128 and 10240 MB.
CPU scales proportional to memory
Timeout
Controls the amount of time a function can execute for.
Value must be less than 15 minutes.
long-running processes are not suited for Lambda
Invocation
Streaming
- AWS Kinesis
- AWS Simple Queue Service (SQS)
- Apache Kafka
Synchronous
- AWS Alexa
- AWS API Gateway
- AWS Application Load Balancer
Asynchronous
services listed above are examples only and not a complete list https://docs.aws.amazon.com/lambda/latest/dg/lambda-services.html
Language Support
Lambda supports most popular programming languages natively, but still provides the ability to use any language by configuring a Runtime API or packaging your code as a Container.
- C#
- Go
- Java
- Node.js
- PowerShell
- Python
- Ruby
Deployment
With serverless applications traditional processes and methods will not work. There are frameworks that exist to solve these types of problems.
Here are my two favorite frameworks:
https://geekflare.com/serverless-apps-frameworks/
Walkthrough Guides
AWS Console
https://aws.amazon.com/getting-started/hands-on/run-serverless-code/
AWS Serverless Workshops
https://data-processing.serverlessworkshops.io/
The Serverless Application Framework (sls)
https://www.serverless.com/framework/docs/providers/aws/examples/hello-world/node/
Top comments (0)