What is AWS Lambda?
AWS Lambda is a serverless infrastructure and computing services. This means you do not need to acquire a server or any other infrastructure. The coder simply writes the code, uploads it, and runs it. It is part of core compute services (EC2, EBS, ELB, Lambda) proved by AWS. Amazon manages the computer power, but it is serverless from our perspective. AWS handles all the underlying infrastructure, deployment of code, and scaling.
What languages are supported by AWS Lambda?
python, Java, node.js, and C#
Example usage of AWS Lambda
Whenever you upload files, you want to create thumbnails automatically. AWS Lambda can do this for you. Every time you upload files, a Lambda function is called and thumbnail is generated. Other uses include:
- scheduled tasks
- event handlers
- replace simple applications
- custom near real-time process of logs
- respond to events generated by S3
Billing for AWS Lambda
Pay for compute time per 100ms. Never pay for idle resources.
How do you use AWS Lambda?
- Create functions through inline editor or upload zip file.
- Start a function
- Define runtime settings
- Define memory limit
- Define execution time out
- Invoke those functions through CLI or SDK, or events
- The code is usually event-driven