SlideShare a Scribd company logo
1 of 31
Learning
Serverless Use Cases
Best Practices
Why
Are We
Here?
Architecture
Computing
Framework
Serverless
Why Serverless?
It is a modern approach to develop web applications
enabling the developers to concentrate on code and deliver
quickly.
It provides decreased time to market and faster software
release.
Welcoming and active community
• Your are not alone!
Reduced costs and Pay as you go
• Let’s take a look at a real world cost comparison:
• This is a production web application with 16000
requests a day
(average response time is 200ms):
• Two EC2 instances → $2.97 / day
• Serverless architecture → $0.05 / day
• Lower operational Costs.
“There is no server better than no server”
– Werner Vogels, CTO Amazon
 No server administration
• Just write your code and you’re good to go.
• Simplifies packaging and deployment and requires no system administration.
• No server upgrades or adding new servers.
 Monstrously scalable
• Your web application scales according to the needs.
Enterprise Using Serverless
and many more...
Serverless Architectures:
Serverless Architecture refer to applications that significantly depend on third-party services
(knows as Backend as a Service or "BaaS") or on custom code that's run in ephemeral containers
(Function as a Service or "FaaS")
Serverless Computing:
Serverless Computing is a cloud computing execution model in which the cloud provider
dynamically manages the allocation of machine resources. Pricing is based on the actual amount of
resources consumed by an application, rather than on pre-purchased units of capacity. It is a form of
utility computing.
Serverless Framework:
Serverless Framework is your single toolkit for deploying serverless architectures
Definition's
An application for which you provide only the application logic that is executed on an infrastructure
you don’t manage 
1. Serverless refers to Serverless applications.
2. Serverless applications are ones that don't require you to provision or manage
any servers.
Serverless
Evolution of Serverless
Physical
Hardware
OS
Run Time
Code
Hardware
OS
Run Time
Code
Hardware
OS
Run Time
Code
Hardware
OS
Run Time
Code
Virtual Container Serverless
Various Serverless Platform
Apache
Openwhisk
Serverless
Platform
Google Cloud
Functions
AWS
LambdaAzure
Functions
WEB Applications
• Static Websites
• Complex Web apps
• Packages for Express
Backends
• Apps and
Services
• Mobile
• IoT
Data Processing
• Real time
• MapReduce
• Batch
Chatbots
• Powering Chatbot
Logic
Amazon Alexa
• Powering Voice
enabled apps
• Alexa Skill Kit
IT Automation
• Policy Engines
• Extending AWS
services
• Infrastructure
management
Common use cases
Use Case
Reservation Itinerary Application
For
Hospitality group managing hotels and Resorts
worldwide
1. Develop secure and scalable application to process reservation data for 7500 properties around the world.
2. Ingest 100,000 messages per day from third party system and should be scalable to 375,000 messages.
3. Application should be able to digest data from existing legacy application during the migration of properties.
4. Migrate the existing EDW to AWS ( 2year worth data around 90 Million unique reservations)
5. Security controls for PII compliance data.
6. Expose API to fetch reservation itinerary for 3rd party application and Mobile application.
Timeline – 3 months.
Development Team size – 3
Testing Team size - 2
Choosing the serverless platform.
XML
Msgs APP 3
EW
D
On Premise
System
External
Source
Kinesis
HTNG Msgs
APP 1
Dynamo DB
Cloud watch logs APP 4
APP 2
Aurora
Cloud
Formation
Bit Bucket
REST
Server-
1
APP 1
Custom
Auth
Mobile
client
AWS IAM
REST
Server-2
APP 1 Web
Client
Amazon
Glacier
Dynamo DB
Solution Architecture
External
Source
Kinesis
APP 1
Dynamo DB
Amazon Glacier
HTNG
1. Archive and Extract details form the HTNG messages (reservation itinerary) received from 3rd
party system.
2. Store the extracted details to the Aurora DB and DynamoDB for further processing.
3. Ensure adequate security measures for the stored and retrieved messages
Third party integration
Design pattern used –AWS: Stream Processing
Process messages (reservation itinerary) received from On-premise /Legacy system, based on the
XML data mapping and extract the details.
Move the extracted details to DynamoDB for further processing.
Cloud Formation Cloud watch
Msg 1
APP 1
Dynamo
DB
EWD
On Premise
System
Bit Bucket
Legacy / On premise integration
Design pattern used –AWS Event-driven data processing.
Process to read lambda Cloud watch logs and update Audit DynamoDB using request ID and sequence
number.
Cloud Formation Cloud watch
Dynamo DBLambda
Bit Bucket
Cloud watch
Monitoring and Auditing Solution
Design pattern used:-Event Driven Automation
Build API’s to fetch Reservation Itinerary details for the mobile application.
Use custom authentication.
Dynamo
DB
REST Server-
1
APP 1
Custom
Auth
Mobile client
API for Legacy Mobile Application
Design pattern -AWS: Web Applications
API’s to fetch Reservation Itinerary details for the third party web applications.
Dynamo DB
AWS IAM
REST Server-2
APP 1 Web Client
API for Web Application
Design pattern -AWS: Web Applications
The estimated time to load all 90 million unique reservation to DynamoDB using AWS kinesis and
lambda was 90 days.
EMR was used to load the EDW data to AWS. The data load process was completed in 3 hours.
Migrating Existing EDW to AWS
EDW
EMR JarHistory
BucketLanding server and
fire hose agent
• Lower cost due to the event based triggering of Lambda.
• Server-less architecture and highly scalable and reliable.
• The time taken to process the record is in milliseconds.
• Async behaviour of Lambda function written in NODE JS, gives better performance and lower cost.
• Logging, caching and throttling of the incoming API Request are taken care by API Gateway.
• Dynamodb offers flexibility of increasing and decreasing throughputs based on the demands.
• Un-authorized access of the AWS Resources are ensured using AWS IAM.
Key Benefits
• Performance testing is the key for ensuring you pick the optimum
memory size configuration.
• Load test your Lambda function to determine an optimum timeout
value.
• Test with different batch and record sizes.
• Test with different compute allocations.
• Lambda functions exist in one of two states:
cold or warm.
Testing is the key to success
Package Size and Language Selection
Lower startup time Package what is required and keep the deployment pack small.
The underlying runtimes for both Python and NodeJS are faster than Java/C#.
Logging
Lambda uses basic logging facilities (e.g. console. WriteLine), which end up in
Cloudwatch.
Leverage your logging library and lambda metrics & Dimensions to log app errors.
(ERR ,ERROR ,Warning ,etc.)
Note:-
There is no SLA/guarantee when (or if) Lambda logs will appear in Cloud
watch.
Overall package size and start-up time appear to influence this. Latencies of
up to 30 minutes have been observed.
Use AWS lambda metrics and cloud watch alarms.
• At a minimum, monitoring and alerting thresholds should be setup for any
business critical functionality:
Throttling (exceeding concurrency)
Failures
Max execution duration.
IteratorAge
Alarms and Metrics
Note:-
AWS Lambda currently does not log errors to CloudWatch Logs that are
caused by insufficient ENIs or IP addresses.
Concurrency and Accessing
VPC Resources
Lambda concurrent calls is limited by the number of free IPs in the subnets
associated with that function or ENI’s.
ENIs capacity = Projected peak concurrent executions * (Memory in GB /
3GB)
• Issue in processing the logs in Cloudwatch
• Cloud watch JSON log order is not sequential and it is unpredictable. These cloud watch
logs are processed, to store the lambda execution details in audit dynamo db. Due to the
unpredictable behavior of cloudwatch logs, there is inconsistency in the data stored in
audit table. Unable to save records based on the order of the incoming messages(i.e.
Sequence number).
Solution:
• Each Cloudwatch log can be arranged based on request Id. So the details are stored in the
dynamodb using the Request Id as primary key. Sequence number is made as GSI in
Dynamodb for further processing.
Challenges Faced
• Challenges in using Java SDK for lambda implementation.
• Lambda function using AWS Java SDK has higher execution time, as the JVM load time is
high. This impacts the performance of the function.
Solution:
• As Node JS takes very less time to load, it can be used to implement the lambda functions.
Moreover the async characteristic of Node JS improves the performance.
• Performance degradation while using DOM Parsers in the message processing.
• DOM parsers are used in Lambda to extract the message details from the incoming messages
in the kinesis stream. But this impacts the performance by increasing the execution time.
Solution:
• Xpath has been used for the extraction logic implementation in Lambda Node JS functions.
This takes very less time to parse the HTNG messages. Issues in processing the logs in
Cloudwatch
Challenges Faced
Netflix & AWS Lambda Case Study
Uses AWS Lambda to build rule-based self-managing infrastructure and replace inefficient processes
to reduce the rate of errors and save valuable time.
1. Encoding Media Files – events fires to track, aggregate, Validate, tag and publish.
2. Backup for Disaster Recovery – Cross region replication, offsite-site backup and validation (raise
alarm in case of failure).
3. Security and conformity – validate new resources for tags and security and raise alarm if not
compliant.
4. Dashboard and monitoring – constantly validating the infrastructure against expected
configuration.
Serverlessusecase workshop feb3_v2

More Related Content

What's hot

Reducing Latency and Increasing Performance while Cutting Infrastructure Costs
Reducing Latency and Increasing Performance while Cutting Infrastructure CostsReducing Latency and Increasing Performance while Cutting Infrastructure Costs
Reducing Latency and Increasing Performance while Cutting Infrastructure CostsAmazon Web Services
 
ENT308 Best Practices for Microsoft Architectures on AWS
ENT308 Best Practices for Microsoft Architectures on AWSENT308 Best Practices for Microsoft Architectures on AWS
ENT308 Best Practices for Microsoft Architectures on AWSAmazon Web Services
 
(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem
(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem
(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud EcosystemAmazon Web Services
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...Amazon Web Services
 
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS LambdaAmazon Web Services
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiecturesIegor Fadieiev
 
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Amazon Web Services
 
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)Amazon Web Services
 
AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...
AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...
AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...Amazon Web Services
 
Deep Dive on Amazon EFS (with Encryption) - AWS Online Tech Talks
Deep Dive on Amazon EFS (with Encryption) - AWS Online Tech TalksDeep Dive on Amazon EFS (with Encryption) - AWS Online Tech Talks
Deep Dive on Amazon EFS (with Encryption) - AWS Online Tech TalksAmazon Web Services
 
Monitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSAmazon Web Services
 
Day 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon Kinesis
Day 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon KinesisDay 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon Kinesis
Day 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon KinesisAmazon Web Services
 
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...Amazon Web Services
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsTensult
 
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...Amazon Web Services
 
Scaling the Platform for Your Startup - Startup Talks June 2015
Scaling the Platform for Your Startup - Startup Talks June 2015Scaling the Platform for Your Startup - Startup Talks June 2015
Scaling the Platform for Your Startup - Startup Talks June 2015Amazon Web Services
 
Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...
Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...
Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...Amazon Web Services
 
Real time sentiment analysis using twitter stream api & aws kinesis
Real time sentiment analysis using twitter stream api & aws kinesisReal time sentiment analysis using twitter stream api & aws kinesis
Real time sentiment analysis using twitter stream api & aws kinesisArmando Padilla
 

What's hot (20)

Reducing Latency and Increasing Performance while Cutting Infrastructure Costs
Reducing Latency and Increasing Performance while Cutting Infrastructure CostsReducing Latency and Increasing Performance while Cutting Infrastructure Costs
Reducing Latency and Increasing Performance while Cutting Infrastructure Costs
 
ENT308 Best Practices for Microsoft Architectures on AWS
ENT308 Best Practices for Microsoft Architectures on AWSENT308 Best Practices for Microsoft Architectures on AWS
ENT308 Best Practices for Microsoft Architectures on AWS
 
Real-Time Streaming Data on AWS
Real-Time Streaming Data on AWSReal-Time Streaming Data on AWS
Real-Time Streaming Data on AWS
 
(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem
(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem
(ARC311) Decoding The Genetic Blueprint Of Life On A Cloud Ecosystem
 
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
AWS re:Invent 2016: Monitoring, Hold the Infrastructure: Getting the Most fro...
 
What's New with AWS Lambda
What's New with AWS LambdaWhat's New with AWS Lambda
What's New with AWS Lambda
 
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
(CMP407) Lambda as Cron: Scheduling Invocations in AWS Lambda
 
Serverless archtiectures
Serverless archtiecturesServerless archtiectures
Serverless archtiectures
 
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
Scaling to millions of users with Amazon CloudFront - April 2017 AWS Online T...
 
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
AWS re:Invent 2016: Building Complex Serverless Applications (GPST404)
 
AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...
AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...
AWS re:Invent 2016| DAT318 | Migrating from RDBMS to NoSQL: How Sony Moved fr...
 
Deep Dive on Amazon EFS (with Encryption) - AWS Online Tech Talks
Deep Dive on Amazon EFS (with Encryption) - AWS Online Tech TalksDeep Dive on Amazon EFS (with Encryption) - AWS Online Tech Talks
Deep Dive on Amazon EFS (with Encryption) - AWS Online Tech Talks
 
Monitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECSMonitoring in Motion: Monitoring Containers and Amazon ECS
Monitoring in Motion: Monitoring Containers and Amazon ECS
 
Day 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon Kinesis
Day 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon KinesisDay 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon Kinesis
Day 5 - Real-time Data Processing/Internet of Things (IoT) with Amazon Kinesis
 
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
AWS re:Invent 2016: Design Patterns for High Availability: Lessons from Amazo...
 
Serverless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloadsServerless design considerations for Cloud Native workloads
Serverless design considerations for Cloud Native workloads
 
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
AWS re:Invent 2016: NextGen Networking: New Capabilities for Amazon’s Virtual...
 
Scaling the Platform for Your Startup - Startup Talks June 2015
Scaling the Platform for Your Startup - Startup Talks June 2015Scaling the Platform for Your Startup - Startup Talks June 2015
Scaling the Platform for Your Startup - Startup Talks June 2015
 
Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...
Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...
Building Cost-Aware Cloud Architectures - Jinesh Varia (AWS) and Adrian Cockc...
 
Real time sentiment analysis using twitter stream api & aws kinesis
Real time sentiment analysis using twitter stream api & aws kinesisReal time sentiment analysis using twitter stream api & aws kinesis
Real time sentiment analysis using twitter stream api & aws kinesis
 

Similar to Serverlessusecase workshop feb3_v2

Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Amazon Web Services
 
NEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeNEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeAmazon Web Services
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaSerhat Can
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Amazon Web Services
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture PatternsAmazon Web Services
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfAmazon Web Services
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...Amazon Web Services
 
SMC303 Real-time Data Processing Using AWS Lambda
SMC303 Real-time Data Processing Using AWS LambdaSMC303 Real-time Data Processing Using AWS Lambda
SMC303 Real-time Data Processing Using AWS LambdaAmazon Web Services
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingAmazon Web Services
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)Amazon Web Services
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshopRory Preddy
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWSSmartWave
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessjavier ramirez
 
Stephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
Stephen Liedig: Building Serverless Backends with AWS Lambda and API GatewayStephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
Stephen Liedig: Building Serverless Backends with AWS Lambda and API GatewaySteve Androulakis
 
Building serverless backends - Tech talk 5 May 2017
Building serverless backends - Tech talk 5 May 2017Building serverless backends - Tech talk 5 May 2017
Building serverless backends - Tech talk 5 May 2017ARDC
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at LifestageBATbern
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudAmazon Web Services
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless ComputingAnand Gupta
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java DeveloperRory Preddy
 

Similar to Serverlessusecase workshop feb3_v2 (20)

Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
Getting Started with Serverless Architectures | AWS Public Sector Summit 2016
 
NEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the EdgeNEW LAUNCH! Bringing AWS Lambda to the Edge
NEW LAUNCH! Bringing AWS Lambda to the Edge
 
Serverless Architectures on AWS Lambda
Serverless Architectures on AWS LambdaServerless Architectures on AWS Lambda
Serverless Architectures on AWS Lambda
 
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
Get the EDGE to scale: Using Cloudfront along with edge compute to scale your...
 
Serverless Architecture Patterns
Serverless Architecture PatternsServerless Architecture Patterns
Serverless Architecture Patterns
 
serverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdfserverless_architecture_patterns_london_loft.pdf
serverless_architecture_patterns_london_loft.pdf
 
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T... Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
Getting Started with AWS Lambda and the Serverless Cloud - AWS Summit Cape T...
 
SMC303 Real-time Data Processing Using AWS Lambda
SMC303 Real-time Data Processing Using AWS LambdaSMC303 Real-time Data Processing Using AWS Lambda
SMC303 Real-time Data Processing Using AWS Lambda
 
SMC301 The State of Serverless Computing
SMC301 The State of Serverless ComputingSMC301 The State of Serverless Computing
SMC301 The State of Serverless Computing
 
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)AWS re:Invent 2016: The State of Serverless Computing (SVR311)
AWS re:Invent 2016: The State of Serverless Computing (SVR311)
 
AWS for Java Developers workshop
AWS for Java Developers workshopAWS for Java Developers workshop
AWS for Java Developers workshop
 
2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS2016-06 - Design your api management strategy - AWS - Microservices on AWS
2016-06 - Design your api management strategy - AWS - Microservices on AWS
 
Primeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverlessPrimeros pasos en desarrollo serverless
Primeros pasos en desarrollo serverless
 
AWS Lambda and Serverless Cloud
AWS Lambda and Serverless CloudAWS Lambda and Serverless Cloud
AWS Lambda and Serverless Cloud
 
Stephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
Stephen Liedig: Building Serverless Backends with AWS Lambda and API GatewayStephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
Stephen Liedig: Building Serverless Backends with AWS Lambda and API Gateway
 
Building serverless backends - Tech talk 5 May 2017
Building serverless backends - Tech talk 5 May 2017Building serverless backends - Tech talk 5 May 2017
Building serverless backends - Tech talk 5 May 2017
 
Serverless at Lifestage
Serverless at LifestageServerless at Lifestage
Serverless at Lifestage
 
Getting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless CloudGetting Started with AWS Lambda and the Serverless Cloud
Getting Started with AWS Lambda and the Serverless Cloud
 
Serverless Computing
Serverless ComputingServerless Computing
Serverless Computing
 
AWS for the Java Developer
AWS for the Java DeveloperAWS for the Java Developer
AWS for the Java Developer
 

Recently uploaded

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 

Recently uploaded (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 

Serverlessusecase workshop feb3_v2

  • 4. Why Serverless? It is a modern approach to develop web applications enabling the developers to concentrate on code and deliver quickly. It provides decreased time to market and faster software release. Welcoming and active community • Your are not alone! Reduced costs and Pay as you go • Let’s take a look at a real world cost comparison: • This is a production web application with 16000 requests a day (average response time is 200ms): • Two EC2 instances → $2.97 / day • Serverless architecture → $0.05 / day • Lower operational Costs. “There is no server better than no server” – Werner Vogels, CTO Amazon
  • 5.  No server administration • Just write your code and you’re good to go. • Simplifies packaging and deployment and requires no system administration. • No server upgrades or adding new servers.  Monstrously scalable • Your web application scales according to the needs.
  • 7. Serverless Architectures: Serverless Architecture refer to applications that significantly depend on third-party services (knows as Backend as a Service or "BaaS") or on custom code that's run in ephemeral containers (Function as a Service or "FaaS") Serverless Computing: Serverless Computing is a cloud computing execution model in which the cloud provider dynamically manages the allocation of machine resources. Pricing is based on the actual amount of resources consumed by an application, rather than on pre-purchased units of capacity. It is a form of utility computing. Serverless Framework: Serverless Framework is your single toolkit for deploying serverless architectures Definition's
  • 8. An application for which you provide only the application logic that is executed on an infrastructure you don’t manage  1. Serverless refers to Serverless applications. 2. Serverless applications are ones that don't require you to provision or manage any servers. Serverless
  • 9. Evolution of Serverless Physical Hardware OS Run Time Code Hardware OS Run Time Code Hardware OS Run Time Code Hardware OS Run Time Code Virtual Container Serverless
  • 11. WEB Applications • Static Websites • Complex Web apps • Packages for Express Backends • Apps and Services • Mobile • IoT Data Processing • Real time • MapReduce • Batch Chatbots • Powering Chatbot Logic Amazon Alexa • Powering Voice enabled apps • Alexa Skill Kit IT Automation • Policy Engines • Extending AWS services • Infrastructure management Common use cases
  • 12. Use Case Reservation Itinerary Application For Hospitality group managing hotels and Resorts worldwide 1. Develop secure and scalable application to process reservation data for 7500 properties around the world. 2. Ingest 100,000 messages per day from third party system and should be scalable to 375,000 messages. 3. Application should be able to digest data from existing legacy application during the migration of properties. 4. Migrate the existing EDW to AWS ( 2year worth data around 90 Million unique reservations) 5. Security controls for PII compliance data. 6. Expose API to fetch reservation itinerary for 3rd party application and Mobile application. Timeline – 3 months. Development Team size – 3 Testing Team size - 2
  • 14. XML Msgs APP 3 EW D On Premise System External Source Kinesis HTNG Msgs APP 1 Dynamo DB Cloud watch logs APP 4 APP 2 Aurora Cloud Formation Bit Bucket REST Server- 1 APP 1 Custom Auth Mobile client AWS IAM REST Server-2 APP 1 Web Client Amazon Glacier Dynamo DB Solution Architecture
  • 15. External Source Kinesis APP 1 Dynamo DB Amazon Glacier HTNG 1. Archive and Extract details form the HTNG messages (reservation itinerary) received from 3rd party system. 2. Store the extracted details to the Aurora DB and DynamoDB for further processing. 3. Ensure adequate security measures for the stored and retrieved messages Third party integration Design pattern used –AWS: Stream Processing
  • 16. Process messages (reservation itinerary) received from On-premise /Legacy system, based on the XML data mapping and extract the details. Move the extracted details to DynamoDB for further processing. Cloud Formation Cloud watch Msg 1 APP 1 Dynamo DB EWD On Premise System Bit Bucket Legacy / On premise integration Design pattern used –AWS Event-driven data processing.
  • 17. Process to read lambda Cloud watch logs and update Audit DynamoDB using request ID and sequence number. Cloud Formation Cloud watch Dynamo DBLambda Bit Bucket Cloud watch Monitoring and Auditing Solution Design pattern used:-Event Driven Automation
  • 18. Build API’s to fetch Reservation Itinerary details for the mobile application. Use custom authentication. Dynamo DB REST Server- 1 APP 1 Custom Auth Mobile client API for Legacy Mobile Application Design pattern -AWS: Web Applications
  • 19. API’s to fetch Reservation Itinerary details for the third party web applications. Dynamo DB AWS IAM REST Server-2 APP 1 Web Client API for Web Application Design pattern -AWS: Web Applications
  • 20. The estimated time to load all 90 million unique reservation to DynamoDB using AWS kinesis and lambda was 90 days. EMR was used to load the EDW data to AWS. The data load process was completed in 3 hours. Migrating Existing EDW to AWS EDW EMR JarHistory BucketLanding server and fire hose agent
  • 21. • Lower cost due to the event based triggering of Lambda. • Server-less architecture and highly scalable and reliable. • The time taken to process the record is in milliseconds. • Async behaviour of Lambda function written in NODE JS, gives better performance and lower cost. • Logging, caching and throttling of the incoming API Request are taken care by API Gateway. • Dynamodb offers flexibility of increasing and decreasing throughputs based on the demands. • Un-authorized access of the AWS Resources are ensured using AWS IAM. Key Benefits
  • 22.
  • 23. • Performance testing is the key for ensuring you pick the optimum memory size configuration. • Load test your Lambda function to determine an optimum timeout value. • Test with different batch and record sizes. • Test with different compute allocations. • Lambda functions exist in one of two states: cold or warm. Testing is the key to success
  • 24. Package Size and Language Selection Lower startup time Package what is required and keep the deployment pack small. The underlying runtimes for both Python and NodeJS are faster than Java/C#.
  • 25. Logging Lambda uses basic logging facilities (e.g. console. WriteLine), which end up in Cloudwatch. Leverage your logging library and lambda metrics & Dimensions to log app errors. (ERR ,ERROR ,Warning ,etc.) Note:- There is no SLA/guarantee when (or if) Lambda logs will appear in Cloud watch. Overall package size and start-up time appear to influence this. Latencies of up to 30 minutes have been observed.
  • 26. Use AWS lambda metrics and cloud watch alarms. • At a minimum, monitoring and alerting thresholds should be setup for any business critical functionality: Throttling (exceeding concurrency) Failures Max execution duration. IteratorAge Alarms and Metrics
  • 27. Note:- AWS Lambda currently does not log errors to CloudWatch Logs that are caused by insufficient ENIs or IP addresses. Concurrency and Accessing VPC Resources Lambda concurrent calls is limited by the number of free IPs in the subnets associated with that function or ENI’s. ENIs capacity = Projected peak concurrent executions * (Memory in GB / 3GB)
  • 28. • Issue in processing the logs in Cloudwatch • Cloud watch JSON log order is not sequential and it is unpredictable. These cloud watch logs are processed, to store the lambda execution details in audit dynamo db. Due to the unpredictable behavior of cloudwatch logs, there is inconsistency in the data stored in audit table. Unable to save records based on the order of the incoming messages(i.e. Sequence number). Solution: • Each Cloudwatch log can be arranged based on request Id. So the details are stored in the dynamodb using the Request Id as primary key. Sequence number is made as GSI in Dynamodb for further processing. Challenges Faced
  • 29. • Challenges in using Java SDK for lambda implementation. • Lambda function using AWS Java SDK has higher execution time, as the JVM load time is high. This impacts the performance of the function. Solution: • As Node JS takes very less time to load, it can be used to implement the lambda functions. Moreover the async characteristic of Node JS improves the performance. • Performance degradation while using DOM Parsers in the message processing. • DOM parsers are used in Lambda to extract the message details from the incoming messages in the kinesis stream. But this impacts the performance by increasing the execution time. Solution: • Xpath has been used for the extraction logic implementation in Lambda Node JS functions. This takes very less time to parse the HTNG messages. Issues in processing the logs in Cloudwatch Challenges Faced
  • 30. Netflix & AWS Lambda Case Study Uses AWS Lambda to build rule-based self-managing infrastructure and replace inefficient processes to reduce the rate of errors and save valuable time. 1. Encoding Media Files – events fires to track, aggregate, Validate, tag and publish. 2. Backup for Disaster Recovery – Cross region replication, offsite-site backup and validation (raise alarm in case of failure). 3. Security and conformity – validate new resources for tags and security and raise alarm if not compliant. 4. Dashboard and monitoring – constantly validating the infrastructure against expected configuration.