7. Introduction to AWS &
AWS Lambda
AWS Lambda is an Amazon serverless
computing system that runs code and
automatically manages the underlying
computing resources like
Serverless is a term that generally refers to serverless applications. Serverless
applications are ones that don’t need any server provision and do not require
to manage servers.
14. Limitations of AWS Lambda
Disk space is limited to 500MB,
Memory can vary from 128MB to 3GB
Execution timeout for a function is 15 minutes.
Size of deployment package (250MB)
Req,res body synchronous event payload can be a maximum of 6
MB
Synchronous invocation payload can be up to 256KB.
1000 concurrent executions across all functions in a Region(soft
limitation)
18. UseCases
Augmenting Data Processing Pipelines:
Scenario: A retail company's MuleSoft application receives orders from multiple sales channels. Upon receiving an order,
MuleSoft triggers a Lambda function to validate the order details, calculate shipping costs based on real-time carrier rates, and
enrich customer data by querying an external CRM system. Once processed, the order data is then forwarded to the fulfillment
system.
Asynchronous Processing:
Scenario: A travel booking platform built with MuleSoft receives flight booking requests from users. Upon receiving a booking
request, MuleSoft immediately responds to the user, confirming receipt. Simultaneously, it triggers a Lambda function to perform
seat availability checks and payment processing. Once completed, the Lambda function updates the booking status, and the user
receives a confirmation email.
Integration with AWS Services:
Scenario: A media streaming service utilizes MuleSoft to manage user subscriptions. When a user signs up for a subscription,
MuleSoft triggers a Lambda function to store the subscription details in an Amazon DynamoDB database. Additionally, the
Lambda function sends a notification to Amazon SNS to alert the content delivery system to grant the user access to premium
content.
Event-Driven Architecture:
Scenario: An IoT platform built with MuleSoft collects data from smart devices deployed in homes. When a device reports an
anomaly, MuleSoft triggers a Lambda function to analyze the data, determine if it's a critical issue, and send alerts to homeowners
via SMS using Amazon SNS. This event-driven approach ensures timely responses to potential issues.
19. UseCases
Error Handling and Retry Mechanisms:
Scenario: A financial application processes transactions using MuleSoft. In case of a network timeout or database connection
failure during transaction processing, MuleSoft triggers a Lambda function responsible for retrying the operation. The Lambda
function implements exponential backoff logic to gradually increase retry intervals and eventually logs the failure for further
investigation.
Cost Optimization:
Scenario: A marketing automation platform built with MuleSoft processes campaign analytics data. Instead of provisioning
dedicated servers to handle occasional data crunching tasks, MuleSoft triggers Lambda functions to process analytics data
periodically. By leveraging Lambda's pay-as-you-go model, the platform optimizes costs, paying only for the compute time
used during data processing.
Executing Business Logic:
Scenario: A healthcare application integrated with MuleSoft needs to perform real-time eligibility checks for insurance claims.
MuleSoft triggers a Lambda function responsible for querying external insurance provider APIs to determine patient coverage
and applicable deductibles. Based on the response, MuleSoft proceeds with claim processing or notifies healthcare providers
of coverage issues.
Real-Time Data Processing:
Scenario: A social media monitoring tool built with MuleSoft collects tweets containing specific keywords. Upon receiving a
tweet, MuleSoft triggers a Lambda function to perform sentiment analysis in real-time. The Lambda function categorizes the
tweet sentiment as positive, negative, or neutral and stores the results in a database for further analysis and reporting.