AWS Lambda is one of the services provided by AWS. A short and precise definition of AWS services can be -
"An driven by events server-less computing platform, that allows it possible for the users to focus on their code rather than pondering over infrastructural management."
All a user needs to do is write their code and upload it to AWS. The code can be set up to be triggered from other AWS services, or be called directly.
AWS Lambda manages server administration, scaling, fault tolerance, and security. AWS handles server administration, so the user never needs to change the underlying OS when changing a path. The code is executed and scaled dynamically in response to the requests. And there is no limit to the amount of requests, thus AWS Lambda maintains consistent performance by launching as many instances as necessary. AWS manages the compute capacity of each region's Availability Zones to safeguard our code from server failures. There is no maintenance window or scheduled downtime with AWS Lambda.
AWS Lambda even supports many functions and a customisable resource strategy. AWS Step Functions enable us to leverage many Lambdas for complex and long-running activities. They provide for the sequential or parallel execution of a collection of Lambdas, as well as error handling. AWS Lambda also allows us to specify how much memory we want to assign to the functions, and it automatically allocates in proportion to CPU power, network bandwidth, and disc I/O.
Another benefit of AWS Lambda is that the user is charged based on computation time and number of time the lambda is triggered.
The below diagram summarizes it's working,
Use cases:-
AWS Lambda can be written to be triggered by changes in data, system status changes, or user actions.
We can use AWS lambda to be triggered immediately after an image is uploaded to the Amazon S3, the lambda can be used to reduce the size of the image, encrypting the image, creating a thumbnail of the image, etc.
AWS Lambda may be used to filter, sort, and transform data.
Create serverless backend for to handle mobile, web, Internet of Things and 3rd party API call.