Mysore MuleSoft Meetup
02-Mar-2024
MuleSoft Integration
with AWS Lambda
💡
Organizers
Shubham Chaurasia
Billennium India
Pro Integration Developer
Giridhar Meka
Sr. Technical Architect
linkedin.com/in/giridharmeka
linkedin.com/in/shubhamchaurasia1
Priya Shaw
LTI MindTree
Sr. Integration Specialist
linkedin.com/in/priya-shaw
Speakers
• Sr. Integration Specialist
• Working in LTIMindTree
• 5+ Years of Experience
• MuleSoft Certified
• IBM Certified
PRIYA SHAW
Speakers
• One of the Youngest MuleSoft Ambassdor
• Professional Integration Developer in Billennium India
• 4+ years of Experience in Integrations
• MCIA, MCD L1, MCPA, MCIA, MCHS Certified,
• Salesforce, AWS, GCP, Azure, Workato Certified
• Mulesoft Meetup Leader | Mentor | Blogger | Speaker
• AWS Community Builder
• https://www.linkedin.com/in/shubhamchaurasia1/
• https://medium.com/@myid535
Shubham Chaurasia
AGENDA
● Introduction to AWS
● AWS Lambda
● AWS API Gateway & Lambda
● Lambda Connector
● Demo
● QnA
● Networking time
AWS OFFERING
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.
AWS LAMBDA FEATURES
WHERE IS AWS LAMBDA USED?
WHERE IS AWS LAMBDA USED
COMPANY THAT USES AWS LAMBDA
HOW DOES LAMBDA WORKS?
HOW DOES LAMBDA WORKS?
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)
CREATE LAMBDA
FUNCTION IN AWS
CONSOLE
CALLING AWS LAMBDA FUNCTION
UseCases with MuleSoft
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.
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.
Demo
Networking time
Thank You

MuleSoft Integration with AWS Lambda [Serverless Function] | MuleSoft Mysore Meetup #44

  • 1.
    Mysore MuleSoft Meetup 02-Mar-2024 MuleSoftIntegration with AWS Lambda 💡
  • 2.
    Organizers Shubham Chaurasia Billennium India ProIntegration Developer Giridhar Meka Sr. Technical Architect linkedin.com/in/giridharmeka linkedin.com/in/shubhamchaurasia1 Priya Shaw LTI MindTree Sr. Integration Specialist linkedin.com/in/priya-shaw
  • 3.
    Speakers • Sr. IntegrationSpecialist • Working in LTIMindTree • 5+ Years of Experience • MuleSoft Certified • IBM Certified PRIYA SHAW
  • 4.
    Speakers • One ofthe Youngest MuleSoft Ambassdor • Professional Integration Developer in Billennium India • 4+ years of Experience in Integrations • MCIA, MCD L1, MCPA, MCIA, MCHS Certified, • Salesforce, AWS, GCP, Azure, Workato Certified • Mulesoft Meetup Leader | Mentor | Blogger | Speaker • AWS Community Builder • https://www.linkedin.com/in/shubhamchaurasia1/ • https://medium.com/@myid535 Shubham Chaurasia
  • 5.
    AGENDA ● Introduction toAWS ● AWS Lambda ● AWS API Gateway & Lambda ● Lambda Connector ● Demo ● QnA ● Networking time
  • 6.
  • 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.
  • 8.
  • 9.
    WHERE IS AWSLAMBDA USED?
  • 10.
    WHERE IS AWSLAMBDA USED
  • 11.
  • 12.
  • 13.
  • 14.
    Limitations of AWSLambda  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)
  • 15.
  • 16.
  • 17.
  • 18.
    UseCases Augmenting Data ProcessingPipelines: 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 andRetry 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.
  • 20.
  • 21.
  • 22.