AWS - Lambda
AWS - Lambda
LAMBDA
FUNCTIONS
Serverless Compute Services
AWS LAMBDA FUNCTIONS
Frequently Used Service
servers, OS)
Event-driven Service
Automatically Triggered
AWS LAMBDA FUNCTIONS
Orchestrator of AWS Services
code execution time and performance are optimized with the right
AWS Lambda consumes photo and implements code to apply filter to the
image
AWS LAMBDA APPLICATIONS
• File processing:
• Amazon Simple Storage Service (Amazon S3) can trigger
Lambda data processing in real time after an upload
• Stream processing:
• Lambda combined with other AWS services can build powerful web
applications that automatically scale up and down and run in a highly
available configuration across multiple data centers
• IoT backends
• Build serverless backends using Lambda to handle web, mobile, IoT, and third-
• Mobile backends
• Build backends using Lambda and Amazon API Gateway to authenticate and
process API requests Use AWS Amplify to easily integrate with your iOS,
LAMBDA FUNCTIONS ANATOMY
Handler( ) Function
Event Object
Context Object
• Note:
• https://console.aws.amazon.com/lambda/home?/region=us-east-1#/b
LAMBDA FUNCTION – SCENARIO 1
Implement a Lambda Function to return the Capitalized version of the
text
1. Login to amazon console with AWS account credentials
2. Select the closest region as per geographical proximity to the server
facilitation
1. Locate for Region drop-down at the top-right corner
2. Choose Asia Pacific (Mumbai) ap-south-1
Note: Only after the region selection proceed any further
3. Locate for Lambda in the Services search bar
4. Now we should land on the Lambda Dashboard
5. Click create function tab
6. Choose the function template type as author from scratch( the default type
) in contrast to the other two choices like
1. Use a blueprint - Build a Lambda application from sample code and
configuration presets for common use cases
LAMBDA FUNCTION – SCENARIO 1
7. Then specify the following information
1. Function name : give a name that describes the purpose of the function to be
implemented ( say capitalizeText)
2. Runtime info : choose the language to use to write your function
Note that the console code editor supports only Node.js, Python, and Ruby
8. Then click on the tab create function
9. Go to Lambda function dashboard and click on the function name capitalizeText
10. Locate the Code source editor and click on the Test tab in blue with a drop down
11. Select configure a test event
12. Give an event name
13. In the Event JSON specify the event and the action as key:value pairs
{
"key1": "value1",
"key2": "value2",
"key3": "value3“
}
LAMBDA FUNCTION – SCENARIO 1
LAMBDA FUNCTION – SCENARIO 1
LAMBDA FUNCTION – SCENARIO 1
LAMBDA FUNCTION – SCENARIO 2
LAMBDA FUNCTION – SCENARIO 2
LAMBDA FUNCTION – SCENARIO 2
LAMBDA FUNCTION – SCENARIO 2
LAMBDA FUNCTION – SCENARIO 2