SlideShare a Scribd company logo
Thanh Nguyen
+84 938203080
nnthanh101@gmail.com
Serverless Architecture 101 ⚡
Agenda
Why are Customers adopting a Serverless-first Strategy?
AXA >> Rearchitecting with Serverless to accelerate innovation
Thinking Serverless
from Business Problem to Serverless Solution ⚡
Getting started with serverless for developers
Demo & Discussion
Quiz
© 2021
3
What do our customers need to drive success?
Get to market faster High performance
and scalability
Security and
isolation by design
Lower total cost of
ownership
© 2021
4
CIO’s say that 80% of developers’ time is spent on the operations
and maintenance of applications and only 20% of the time is
actually spent on innovation
Source: Deloitte 2019
© 2021
6
Why are customers building with a serverless-first
strategy?
Agility Performance Cost Security
© 2021
7
How are customers adopting a serverless strategy?
Lift and shift
REDUCE
the amount of DIY
MIGRATE
to AWS
MODERNIZE
onAWS
Retire SaaS Refactor
Replatform
BUILD NEW INNOVATION
© 2021
8
Computing evolution – A paradigm shift
LEVEL
OF
ABSTRACTION
FOCUS ON BUSINESS LOGIC
PHYSICAL MACHINES
Requires “guess” planning
Lives for years on-premises
Heavy investments (capex)
Low innovation factor
Deploy in months
© 2021
9
Computing evolution – A paradigm shift
LEVEL
OF
ABSTRACTION
FOCUS ON BUSINESS LOGIC
VIRTUAL MACHINES
Hardware independence
Faster provisioning speed (minutes/hours)
Trade capex for opex
More scale
Elastic resources
Faster speed and agility
Reduced maintenance
© 2021
10
Computing evolution – A paradigm shift
LEVEL
OF
ABSTRACTION
FOCUS ON BUSINESS LOGIC
CONTAINERIZATION
Platform independence
Consistent runtime environment
Higher resource utilization
Easier and faster deployments
Isolation and sandboxing
Start speed (deploy in seconds)
© 2021
11
Computing evolution – A paradigm shift
AWS Lambda
AWS Fargate
LEVEL
OF
ABSTRACTION
FOCUS ON BUSINESS LOGIC
Continuous scaling
Fault tolerance built-in
Pay for value
Zero maintenance
SERVERLESS
© 2021
12
Leap Frog Adoption
C
A
PA
C
I
T
Y
P
R
O
C
E
S
S
E
S
C
O
S
T
M
O
D
E
L
S
OP ER AT I ON AL P R OCESS ES DEV ELOP MEN T MODELS
ON-PREMISES
CLOUD
“LEGACY”ARCHITECTURES MODERNARCHITECTURES
AWS
EC2
AWS
ECS
AWS
FARGATE
AWS
EKS
Containers
AWS
ECS
AWS
FARGATE
AWS
EKS
© 2021
13
What is Serverless?
No infrastructure provisioning,
no management
Automatic scaling
Pay for value Highly available and secure
© 2021
Serverless Architecture
Event Source Function Services / Other
Node.js
Python
Java
C#
Go
Ruby
BringYour Own
Changes in
data state
Requests to
endpoints
Changes in
resource state
© 2021
15
Lambda execution model
© 2020, AmazonWeb Services, Inc. or its affiliates. All rights
Synchronous (push) Asynchronous (event) Stream-based
Amazon API
Gateway
Lambda
function
Amazon DynamoDB
Amazon SNS
/order
Lambda
function
Amazon S3
Reqs
Amazon Kinesis
Changes
AWS Lambda
service
Function
© 2021
16
AWS
Lambda
AWS
Fargate
Amazon
API Gateway
Amazon
SNS
Amazon
SQS
AWS
Step Functions
COMPUTE
DATA STORES
INTEGRATION
AWS
AppSync
Amazon Aurora
Serverless
Amazon
S3
Amazon
DynamoDB
Amazon
EventBridge
AXA:RearchitectingwithServerlessto accelerate
innovation
Multinational insurance firm that
engages in property-casualty insurance,
life and savings, and asset management
Present in 57 countries, with 160,000
employees and distributors, to serve our
108 million clients
AXA Group Operations
Emerging technologies
and data division
Explores and scales value of data and
emerging technologies with potential to
disrupt current insurance
business model
AXA GO
6 years in business
Flagship project – automotive
telematics, which combine data science
and data processing chain
Team-developed and maintained
solution (data science, network, mobile,
backend, and so on)
Telematics team
Business rational
• Develop data-driven motor
insurance policies
• Pay per mile, per day, per risk profile, with
periodic premium adjustment
• Provide immediate “post-trip” risk feedback to
help customer drive safer
Where we are today
• Live connection with black boxes, smartphones,
and native car connectivity
as GPS sources
• 5 offers on EU market
• 40,000+ customers
• 60,000+ vehicle trips per day
AXA-TEXproject –TelematicsExchange platform
AXA-TEX– High-levelfunctional view
Sources Acquisition
Storage
Analysis
….
Processing
OBD
Presentation
Box
Smartphone
Weather
Mapping
Algorithms and Data Lake
Connected Car
Dashboard
App
API
1 AWS account,
multiple environments
Over 50 Amazon EC2 instances in total
Designed for portability to
AXA data center
• Deployment with Ansible
• Limited AWS technologies used
• Infrastructure withTerraform
AXA-TEXas webuilt it in 2015 (v1)
Elastic Load
Balancing
AWS Cloud
Admin
Shinken
Syslog
Scoring
Business logic
Flume
Datafront
HAProxy
Business logic
Nginx
Analytics
Carbon
Grafana
Kibana
Dashboards
Nginx
Business logic
Worker
Apache Kafka
Zookeeper
MongoDB
PostgreSQL
Business logic
Elasticsearch
Elasticsearch
Efforts to manage
• Setup of monitoring tools
• Regular fix / security
updates needed
• Difficult to add new components
• Deployment complex and slow
• HSM and IPSec links to manage due to
strong security constraints
Whyweneeded tochange?
Focus on features
We want to spend more
time developing
functionalities than
managing a system
Easier scaling
Scalability of our
architecture is possible, but
both manual and difficult
Lack of scalability of some
components due to hasty
decisions
Less system
engineering
Amazon EC2 management
requires regular system
updates, advanced
monitoring and major
operational challenges
More security
We are subject to strong
constraints that are
difficult for our team to
manage
TEXv2
Messaging /
event
streaming
ESBs
Amazon Managed Streaming
for Apache Kafka (Amazon MSK)
Amazon Kinesis Amazon SQS / Amazon SNS
Kafka on
Amazon EC2
AWS operational responsibilitymodels
On-premises Cloud - IaaS
TEX v1
Less
More
Compute
Virtual
machine Amazon EC2 AWS Elastic Beanstalk AWS Lambda
AWS Fargate
Relational
database
PostgreSQL PostgreSQL on
Amazon EC2
Amazon RDS Amazon Aurora Aurora Serverless
Amazon DynamoDB
MongoDB MongoDB on
Amazon EC2
Amazon DocumentDB
Document-
oriented
database
Cloud - Serverless
Moving toserverless –Compute
Virtual machine
on-premises
Amazon EC2 Elastic Beanstalk Lambda
Fargate
TEX v1
Usage
Asynchronous processing of
car data stream
Benefits
• High scalability
• Cost optimization
• Integration with
other AWS services (e.g.,
Kinesis)
Usage
• Communication
with telematics
boxes via UDP
• Long batches
Benefits
• Flexibility of containers
• Serverless infrastructure
90%
10%
Moving toserverless – Messaging/Streaming
Usage
Message queue to compute
driver score
Benefits
Automatic scalability
Usage
• Car event streaming
• Multiple consumers
• Need to preserve order
Benefits
• Easy to scale by increasing
number
of shards
• Possibility to
TEX v1
Amazon MSK Kinesis
Amazon SQS /
Amazon SNS
Kafka on
Amazon EC2
Kafka
on-premises
Data
Database
TEX v1
Database
TEX v2
Current trips
MongoDB
on Amazon EC2
DynamoDB
Moving toserverless:Databases
Data
Database
TEX v1
Database
TEX v2
Current trips
MongoDB
on Amazon EC2
DynamoDB
Driver scores /
trips history
Elasticsearch
on Amazon EC2 Aurora
Serverless –
PostgreSQL
Cartography
PostgreSQL
on Amazon EC2
Messaging /
event
streaming
ESBs
Amazon MSK Kinesis Amazon SQS /
Amazon SNS
Kafka on
Amazon EC2
AWS operational responsibilitymodels
Compute
Virtual
machine Amazon EC2 Elastic Beanstalk Lambda
Fargate
On-premises
Less
More
Relational
database
PostgreSQL PostgreSQL on
Amazon EC2
Amazon RDS Aurora Aurora Serverless
DynamoDB
MongoDB MongoDB on
Amazon EC2
Amazon
DocumentDB
Document-
oriented
database
TEX v1 TEX v2
Cloud - IaaS Cloud - Serverless
TEXv2 –Simplified processing pipeline
Supervision and monitoring
KMS ACM Secrets Manager CloudWatch Route 53 Parameter
Store
AWS Cloud
Athena
EMR
Kinesis
Firehose
Fargate
Specific
Tools
S3
Data lake
Aurora
Trips
Aurora
Scores
Persistence
AXA entities
Lambda
API
GW
Data presentation
Enrichment
Traffic data
provider
Weather data
provider
Lambda
Aurora
Cartography
Amazon
ElastiCach
e
API
GW
Ingestion
Driving data
provider
S3
Lambda
Lambda
CloudWatch
Events
Processing
DynamoDB
Sessions
Kinesis Kinesis SQS
Lambda
Enrichment
Lambda
Trip Creation
Lambda
Driving Score
Business logic scaling effect
• Smoothly scale depending on road traffic
• Development environment – no traffic
≃$0 for Lambda
• Production environment – lower cost than
fault-tolerant servers dedicated to business logic
TEXv2 – Lambda activities
Kinesis incoming records Data enrichment
Lambda invocations
AXA Landing Zone
• Activation of monitoring and security tools,
such as CloudTrail, Amazon GuardDuty, service
control policies, and so on
• Authentication management
• Ensure compliance with Config
• Centralized billing
 Presentation made at AWS re:Invent 2019
TEXv2 –AWSAccounts organization
Developers
Terraform
deployment
Read only
Terraform
deployment
Data scientists
AXA Landing Zone
Project Project Project
Git
Analytics
Tools
TEX Production
Preprod and UAT
Integration
Developer account
Developer account
Developer account
AXA organization
VPC peering
TEX
Foundation
AXA
Foundation
Prime accounts
One AWS account per variant – prod, preprod,
development
Analytics account
• Read-only access for the production
• VPC peering for Aurora access
• Monitored actions of data scientists
Tools account
• CI / CD (Jenkins)
• Artifact library (S3)
• DNS management
TEXv2 – Did we succeedin resolvingour issues?
Less system
engineering
Easier scaling More security Focus on features
✓ ✓ ✓ ✓
A full class of issues
disappeared with the
serverless migration
The architecture and the
infrastructure just scale
Some components may
need manual tuning
We spend less time in
maintaining the
infrastructure,
So we are more comfortable
in adding new features
We do not think about it
anymore
Remaining tasks are on
database performance with
business logic
Lessons learned
Aurora Serverless requires aVPC configuration
Kinesis shards and Aurora units need manual tuning
Full serverless is not always possible, hybrid approach should be kept in
mind and integrated in infrastructure as code
Fewer features with Aurora Serverless than with Amazon RDS equivalents
Kinesis costs, even if not used
Serverless still needs configuration
Hybrid architecture
Techno maturity
Lambda can scale too much and be costly if bug in logic or
architecture – set alarms and limits
Control automatic scaling
 State management
 Monolithic container for functionality
 One version, one server
 Server is an atomic unit of thinking
 The challenges of this model
How do weuseServers?
Serverless Architecture 101 ⚡
Features first Focus on Events Stateless Data-flow Use the Services
Avoid monolithic
thinking
Events are triggers
that cause action
The key to
scaling
effectively
Make data
decisions early on
Don’t reinvent
the wheel
GeneralApproach toThinkingServerless
Attributes
 Runs on demand
 Supports many runtimes
 Responds to events
 Stateless
 Automatically scales
Best practices
 Avoid lift-and-shift
 One function per purpose
 Keep functions small
 Choose the right runtime for the job
 Use functions for business logic and
plumbing between services
✍️Understanding howAWS Lambda fitsin
 Infrastructure is disposable
 Asynchronous versus synchronous processing
 You can mix and match runtimes
 Security still matters: build in from the start
 Automation
 AWS Serverless Application Model (AWS SAM)
 The AWS Cloud Development Kit (AWS CDK)
 Serverless Framework
✍️GoodServerlesspractices
1. Form upload
Create a serverless application to support a customer review form submitted from
a webpage
1. Form upload
Create a serverless application to support a customer review form submitted from
a webpage
Amazon
API Gateway
AWS Lambda Amazon
DynamoDB
1. Form upload
Create a serverless application to support a customer review form submitted
from a webpage
Amazon
API Gateway
AWS Lambda Amazon
DynamoDB
AWS Lambda Amazon
Translate
1. Form upload
Create a serverless application to support a customer review form submitted
from a webpage
AWS Lambda
Amazon S3
1. Form upload
Create a serverless application to support a customer review form submitted
from a webpage
AWS Lambda
Amazon SNS
Amazon
Comprehend
1. Form upload
Create a serverless application to support a customer review form submitted from
a webpage
Amazon Cognito
Amazon API
Gateway
A global retailer wants to implement a virtual queue for customers. Use an IoT
button to manage a “now serving” counter.
2.Createa virtualqueue
A global retailer wants to implement a virtual queue for customers. Use an IoT
button to manage a “now serving” counter.
2.Createa virtualqueue
IoT button AWS IoT Core AWS Lambda Amazon
DynamoDB
AWS Lambda
Amazon API
Gateway
Customer display
A global retailer wants to implement a virtual queue for customers. Use an IoT
button to manage a “now serving” counter.
2.Createa virtualqueue
AWS Lambda AWS IoT Core Customer display
A global retailer wants to implement a virtual queue for customers. Use an IoT
button to manage a “now serving” counter.
2.Createa virtualqueue
AWS Lambda
Amazon S3
Amazon Polly
A global retailer wants to implement a virtual queue for customers. Use an IoT
button to manage a “now serving” counter.
2.Createa virtualqueue
Amazon
EventBridge rule
(scheduled)
AWS Lambda Amazon SNS
A global retailer wants to implement a virtual queue for customers. Use an IoT
button to manage a “now serving” counter.
2.Createa virtualqueue
Create a serverless web application to
support an e-commerce business
 High volume, spiky,
unpredictable traffic patterns
 Geographically distributed
 Requires high performance
front-end, low latency
3.WebApplication
Create a serverless web application to support a national e-commerce business
3.Web application
Browser
Amazon Route 53 AWS Amplify
console
GitHub repo
Create a serverless web application to support a national e-commerce business
3.Web application
Amazon
Cognito
Auth0
Create a serverless web application to support a national e-commerce business
3.Web application
Amazon
API Gateway
AWS Lambda
Amazon
S3
AWS Lambda Amazon
S3
AWS Lambda Amazon
DynamoDB
1.Serverlessfor Developers
2.Thebusinesslogic
3.Thefront door
4.Localdeveloper workflow
5.Sandbox developer account
© 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
© 2020, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Serverl
ess
vocabu
lary
Live Demo
https://dashboard.job4u.io
KPI Dashboard on AWS
Data Ingestion API
Operations
 Runbook: logging, monitoring, alerting on issues
 Scaling: how to scale Performance Dashboard
 Security
 Shared Responsibility between AWS & Customer
 IP Blocking: limit access to come from
an IP range (e.g. on-premises network)
Serverless Architecture 101 ⚡
© 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark
© 2020, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Serverl
ess
vocabu
lary
LAB
https://webapp.serverlessworkshops.io/
https://github.com/aws-samples/getting-
started-with-serverless
Thankyou!
© 2021
https://www.facebook.com/groups/devax
https://github.com/DevAx101/MicroServices
https://github.com/DevAx101/Terraform
https://dashboard.job4u.io 🔥

More Related Content

PPTX
AWS solution Architect Associate study material
PPTX
Basics AWS Presentation
PPTX
Serverless
PPT
Cloud Computing and Amazon Web Services
PPTX
What is Serverless Computing?
PPTX
Introduction to Microsoft Azure
PDF
The Layman's Guide to Microsoft Azure
PPT
Cloud computing
AWS solution Architect Associate study material
Basics AWS Presentation
Serverless
Cloud Computing and Amazon Web Services
What is Serverless Computing?
Introduction to Microsoft Azure
The Layman's Guide to Microsoft Azure
Cloud computing

What's hot (20)

PDF
IaaS, SaaS, PasS : Cloud Computing
PPTX
Introduction to Amazon Web Services (AWS)
PPTX
Virtualization
PDF
What Is Serverless Computing
PPTX
Microsoft Azure in 5 minutes
PPTX
Azure Cloud PPT
PPTX
Unit 2 Virtualization Part I.pptx
PDF
네트워크 및 엣지 컴퓨팅 분야 신규 서비스 - 최우형, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
PDF
금융권을 위한 AWS Direct Connect 기반 하이브리드 구성 방법 - AWS Summit Seoul 2017
PDF
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
PPTX
Multi tenant architecture
PPT
Microsoft Azure a cloud computing platform
PPTX
Introduction to Microsoft Azure
PDF
Introduction to Serverless with AWS Lambda
PDF
AWS와 함께하는 클라우드 컴퓨팅 - 강철, AWS 어카운트 매니저 :: AWS Builders 100
PDF
고급 클라우드 아키텍처 방법론- 양승도 솔루션즈 아키텍트:: AWS Cloud Track 2 Advanced
PDF
Serverless Computing
PDF
What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
PDF
Aws Architecture Fundamentals
PPTX
AWS VS AZURE VS GCP.pptx
IaaS, SaaS, PasS : Cloud Computing
Introduction to Amazon Web Services (AWS)
Virtualization
What Is Serverless Computing
Microsoft Azure in 5 minutes
Azure Cloud PPT
Unit 2 Virtualization Part I.pptx
네트워크 및 엣지 컴퓨팅 분야 신규 서비스 - 최우형, AWS 솔루션즈 아키텍트 :: AWS re:Invent re:Cap 2021
금융권을 위한 AWS Direct Connect 기반 하이브리드 구성 방법 - AWS Summit Seoul 2017
AWS CLOUD 2017 - AWS 기반 하이브리드 클라우드 환경 구성 전략 (김용우 솔루션즈 아키텍트)
Multi tenant architecture
Microsoft Azure a cloud computing platform
Introduction to Microsoft Azure
Introduction to Serverless with AWS Lambda
AWS와 함께하는 클라우드 컴퓨팅 - 강철, AWS 어카운트 매니저 :: AWS Builders 100
고급 클라우드 아키텍처 방법론- 양승도 솔루션즈 아키텍트:: AWS Cloud Track 2 Advanced
Serverless Computing
What is AWS | AWS Certified Solutions Architect | AWS Tutorial | AWS Training...
Aws Architecture Fundamentals
AWS VS AZURE VS GCP.pptx
Ad

Similar to Serverless Architecture 101 ⚡ (15)

PDF
Confluent_AWS_ImmersionDay_Q42023.pdf
PDF
Build real-time streaming data pipelines to AWS with Confluent
PDF
AWSome Day Singapore Keynote 2015
PDF
AWSome Day Philippines Keynote 2015
PDF
AWSome Day Indonesia Keynote 2015
PPTX
Building Modern Applications on AWS.pptx
PPTX
How to Optimize Your AWS Environment for Improved Cloud Performance
PDF
Vn introduction to cloud computing with amazon web services
PPTX
Saurabh_Shanbhag - Building_SaaS_on_AWS.pptx
PDF
Building Real-Time Serverless Data Applications With Joseph Morais and Adam W...
PDF
Inside BMW's cloud-native DevOps approach to application migration on AWS
PDF
Aws 101 jan 2015 hr bang
PPTX
Holidayme's Journey to microservices and serverless in under 18 months
PPTX
Primeros pasos en desarrollo serverless
PPTX
AWS ReInvent - M2 Service - providing cloud services for technologists
Confluent_AWS_ImmersionDay_Q42023.pdf
Build real-time streaming data pipelines to AWS with Confluent
AWSome Day Singapore Keynote 2015
AWSome Day Philippines Keynote 2015
AWSome Day Indonesia Keynote 2015
Building Modern Applications on AWS.pptx
How to Optimize Your AWS Environment for Improved Cloud Performance
Vn introduction to cloud computing with amazon web services
Saurabh_Shanbhag - Building_SaaS_on_AWS.pptx
Building Real-Time Serverless Data Applications With Joseph Morais and Adam W...
Inside BMW's cloud-native DevOps approach to application migration on AWS
Aws 101 jan 2015 hr bang
Holidayme's Journey to microservices and serverless in under 18 months
Primeros pasos en desarrollo serverless
AWS ReInvent - M2 Service - providing cloud services for technologists
Ad

More from Thanh Nguyen (20)

PPTX
Building a NFT Marketplace DApp
PPTX
The fundamentals of AWS Cloud Security 🛠⛅️🚀
PDF
Migrating Monolithic Applications with the Strangler Pattern
PDF
E301 Elastic Beanstalk PaaS
PDF
Serverless Data Lake on AWS
PPSX
SmartChat WhatsApp-clone using AWS Amplify AppSync
PDF
Introduction to Ethereum Blockchain & Smart Contract
PPTX
Amazon AWS Free-Tier
PPT
Rapid Software Development Process
PDF
PMI ACP Classroom Question Paper
PDF
PMI ACP Classroom Question Paper with Answers
PDF
PMI-ACP Case Study
PDF
PMI-ACP Lesson 12 Knowledge and Skills Nugget 4
PDF
PMI-ACP Lesson 12 Knowledge and Skills Nugget 3
PDF
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
PDF
PMI-ACP Lesson 12 Knowledge and Skills Nugget 1
PDF
PMI-ACP Lesson 11 Agile Value Stream Analysis
PDF
PMI-ACP Lesson 10 Agile Metrics
PDF
PMI-ACP Lesson 9 Agile Risk Management
PDF
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization
Building a NFT Marketplace DApp
The fundamentals of AWS Cloud Security 🛠⛅️🚀
Migrating Monolithic Applications with the Strangler Pattern
E301 Elastic Beanstalk PaaS
Serverless Data Lake on AWS
SmartChat WhatsApp-clone using AWS Amplify AppSync
Introduction to Ethereum Blockchain & Smart Contract
Amazon AWS Free-Tier
Rapid Software Development Process
PMI ACP Classroom Question Paper
PMI ACP Classroom Question Paper with Answers
PMI-ACP Case Study
PMI-ACP Lesson 12 Knowledge and Skills Nugget 4
PMI-ACP Lesson 12 Knowledge and Skills Nugget 3
PMI-ACP Lesson 12 Knowledge and Skills Nugget 2
PMI-ACP Lesson 12 Knowledge and Skills Nugget 1
PMI-ACP Lesson 11 Agile Value Stream Analysis
PMI-ACP Lesson 10 Agile Metrics
PMI-ACP Lesson 9 Agile Risk Management
PMI-ACP Lesson 08 Nugget 2 Agile & Scrum - Value-Based Prioritization

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
KodekX | Application Modernization Development
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
cuic standard and advanced reporting.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
Building Integrated photovoltaic BIPV_UPV.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Programs and apps: productivity, graphics, security and other tools
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KodekX | Application Modernization Development
Understanding_Digital_Forensics_Presentation.pptx
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
cuic standard and advanced reporting.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
NewMind AI Weekly Chronicles - August'25 Week I
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks
Reach Out and Touch Someone: Haptics and Empathic Computing
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation

Serverless Architecture 101 ⚡

  • 2. Agenda Why are Customers adopting a Serverless-first Strategy? AXA >> Rearchitecting with Serverless to accelerate innovation Thinking Serverless from Business Problem to Serverless Solution ⚡ Getting started with serverless for developers Demo & Discussion Quiz
  • 3. © 2021 3 What do our customers need to drive success? Get to market faster High performance and scalability Security and isolation by design Lower total cost of ownership
  • 4. © 2021 4 CIO’s say that 80% of developers’ time is spent on the operations and maintenance of applications and only 20% of the time is actually spent on innovation Source: Deloitte 2019
  • 5. © 2021 6 Why are customers building with a serverless-first strategy? Agility Performance Cost Security
  • 6. © 2021 7 How are customers adopting a serverless strategy? Lift and shift REDUCE the amount of DIY MIGRATE to AWS MODERNIZE onAWS Retire SaaS Refactor Replatform BUILD NEW INNOVATION
  • 7. © 2021 8 Computing evolution – A paradigm shift LEVEL OF ABSTRACTION FOCUS ON BUSINESS LOGIC PHYSICAL MACHINES Requires “guess” planning Lives for years on-premises Heavy investments (capex) Low innovation factor Deploy in months
  • 8. © 2021 9 Computing evolution – A paradigm shift LEVEL OF ABSTRACTION FOCUS ON BUSINESS LOGIC VIRTUAL MACHINES Hardware independence Faster provisioning speed (minutes/hours) Trade capex for opex More scale Elastic resources Faster speed and agility Reduced maintenance
  • 9. © 2021 10 Computing evolution – A paradigm shift LEVEL OF ABSTRACTION FOCUS ON BUSINESS LOGIC CONTAINERIZATION Platform independence Consistent runtime environment Higher resource utilization Easier and faster deployments Isolation and sandboxing Start speed (deploy in seconds)
  • 10. © 2021 11 Computing evolution – A paradigm shift AWS Lambda AWS Fargate LEVEL OF ABSTRACTION FOCUS ON BUSINESS LOGIC Continuous scaling Fault tolerance built-in Pay for value Zero maintenance SERVERLESS
  • 11. © 2021 12 Leap Frog Adoption C A PA C I T Y P R O C E S S E S C O S T M O D E L S OP ER AT I ON AL P R OCESS ES DEV ELOP MEN T MODELS ON-PREMISES CLOUD “LEGACY”ARCHITECTURES MODERNARCHITECTURES AWS EC2 AWS ECS AWS FARGATE AWS EKS Containers AWS ECS AWS FARGATE AWS EKS
  • 12. © 2021 13 What is Serverless? No infrastructure provisioning, no management Automatic scaling Pay for value Highly available and secure
  • 13. © 2021 Serverless Architecture Event Source Function Services / Other Node.js Python Java C# Go Ruby BringYour Own Changes in data state Requests to endpoints Changes in resource state
  • 14. © 2021 15 Lambda execution model © 2020, AmazonWeb Services, Inc. or its affiliates. All rights Synchronous (push) Asynchronous (event) Stream-based Amazon API Gateway Lambda function Amazon DynamoDB Amazon SNS /order Lambda function Amazon S3 Reqs Amazon Kinesis Changes AWS Lambda service Function
  • 15. © 2021 16 AWS Lambda AWS Fargate Amazon API Gateway Amazon SNS Amazon SQS AWS Step Functions COMPUTE DATA STORES INTEGRATION AWS AppSync Amazon Aurora Serverless Amazon S3 Amazon DynamoDB Amazon EventBridge
  • 16. AXA:RearchitectingwithServerlessto accelerate innovation Multinational insurance firm that engages in property-casualty insurance, life and savings, and asset management Present in 57 countries, with 160,000 employees and distributors, to serve our 108 million clients AXA Group Operations Emerging technologies and data division Explores and scales value of data and emerging technologies with potential to disrupt current insurance business model AXA GO 6 years in business Flagship project – automotive telematics, which combine data science and data processing chain Team-developed and maintained solution (data science, network, mobile, backend, and so on) Telematics team
  • 17. Business rational • Develop data-driven motor insurance policies • Pay per mile, per day, per risk profile, with periodic premium adjustment • Provide immediate “post-trip” risk feedback to help customer drive safer Where we are today • Live connection with black boxes, smartphones, and native car connectivity as GPS sources • 5 offers on EU market • 40,000+ customers • 60,000+ vehicle trips per day AXA-TEXproject –TelematicsExchange platform
  • 18. AXA-TEX– High-levelfunctional view Sources Acquisition Storage Analysis …. Processing OBD Presentation Box Smartphone Weather Mapping Algorithms and Data Lake Connected Car Dashboard App API
  • 19. 1 AWS account, multiple environments Over 50 Amazon EC2 instances in total Designed for portability to AXA data center • Deployment with Ansible • Limited AWS technologies used • Infrastructure withTerraform AXA-TEXas webuilt it in 2015 (v1) Elastic Load Balancing AWS Cloud Admin Shinken Syslog Scoring Business logic Flume Datafront HAProxy Business logic Nginx Analytics Carbon Grafana Kibana Dashboards Nginx Business logic Worker Apache Kafka Zookeeper MongoDB PostgreSQL Business logic Elasticsearch Elasticsearch Efforts to manage • Setup of monitoring tools • Regular fix / security updates needed • Difficult to add new components • Deployment complex and slow • HSM and IPSec links to manage due to strong security constraints
  • 20. Whyweneeded tochange? Focus on features We want to spend more time developing functionalities than managing a system Easier scaling Scalability of our architecture is possible, but both manual and difficult Lack of scalability of some components due to hasty decisions Less system engineering Amazon EC2 management requires regular system updates, advanced monitoring and major operational challenges More security We are subject to strong constraints that are difficult for our team to manage
  • 21. TEXv2
  • 22. Messaging / event streaming ESBs Amazon Managed Streaming for Apache Kafka (Amazon MSK) Amazon Kinesis Amazon SQS / Amazon SNS Kafka on Amazon EC2 AWS operational responsibilitymodels On-premises Cloud - IaaS TEX v1 Less More Compute Virtual machine Amazon EC2 AWS Elastic Beanstalk AWS Lambda AWS Fargate Relational database PostgreSQL PostgreSQL on Amazon EC2 Amazon RDS Amazon Aurora Aurora Serverless Amazon DynamoDB MongoDB MongoDB on Amazon EC2 Amazon DocumentDB Document- oriented database Cloud - Serverless
  • 23. Moving toserverless –Compute Virtual machine on-premises Amazon EC2 Elastic Beanstalk Lambda Fargate TEX v1 Usage Asynchronous processing of car data stream Benefits • High scalability • Cost optimization • Integration with other AWS services (e.g., Kinesis) Usage • Communication with telematics boxes via UDP • Long batches Benefits • Flexibility of containers • Serverless infrastructure 90% 10%
  • 24. Moving toserverless – Messaging/Streaming Usage Message queue to compute driver score Benefits Automatic scalability Usage • Car event streaming • Multiple consumers • Need to preserve order Benefits • Easy to scale by increasing number of shards • Possibility to TEX v1 Amazon MSK Kinesis Amazon SQS / Amazon SNS Kafka on Amazon EC2 Kafka on-premises
  • 25. Data Database TEX v1 Database TEX v2 Current trips MongoDB on Amazon EC2 DynamoDB Moving toserverless:Databases Data Database TEX v1 Database TEX v2 Current trips MongoDB on Amazon EC2 DynamoDB Driver scores / trips history Elasticsearch on Amazon EC2 Aurora Serverless – PostgreSQL Cartography PostgreSQL on Amazon EC2
  • 26. Messaging / event streaming ESBs Amazon MSK Kinesis Amazon SQS / Amazon SNS Kafka on Amazon EC2 AWS operational responsibilitymodels Compute Virtual machine Amazon EC2 Elastic Beanstalk Lambda Fargate On-premises Less More Relational database PostgreSQL PostgreSQL on Amazon EC2 Amazon RDS Aurora Aurora Serverless DynamoDB MongoDB MongoDB on Amazon EC2 Amazon DocumentDB Document- oriented database TEX v1 TEX v2 Cloud - IaaS Cloud - Serverless
  • 27. TEXv2 –Simplified processing pipeline Supervision and monitoring KMS ACM Secrets Manager CloudWatch Route 53 Parameter Store AWS Cloud Athena EMR Kinesis Firehose Fargate Specific Tools S3 Data lake Aurora Trips Aurora Scores Persistence AXA entities Lambda API GW Data presentation Enrichment Traffic data provider Weather data provider Lambda Aurora Cartography Amazon ElastiCach e API GW Ingestion Driving data provider S3 Lambda Lambda CloudWatch Events Processing DynamoDB Sessions Kinesis Kinesis SQS Lambda Enrichment Lambda Trip Creation Lambda Driving Score
  • 28. Business logic scaling effect • Smoothly scale depending on road traffic • Development environment – no traffic ≃$0 for Lambda • Production environment – lower cost than fault-tolerant servers dedicated to business logic TEXv2 – Lambda activities Kinesis incoming records Data enrichment Lambda invocations
  • 29. AXA Landing Zone • Activation of monitoring and security tools, such as CloudTrail, Amazon GuardDuty, service control policies, and so on • Authentication management • Ensure compliance with Config • Centralized billing  Presentation made at AWS re:Invent 2019 TEXv2 –AWSAccounts organization Developers Terraform deployment Read only Terraform deployment Data scientists AXA Landing Zone Project Project Project Git Analytics Tools TEX Production Preprod and UAT Integration Developer account Developer account Developer account AXA organization VPC peering TEX Foundation AXA Foundation Prime accounts One AWS account per variant – prod, preprod, development Analytics account • Read-only access for the production • VPC peering for Aurora access • Monitored actions of data scientists Tools account • CI / CD (Jenkins) • Artifact library (S3) • DNS management
  • 30. TEXv2 – Did we succeedin resolvingour issues? Less system engineering Easier scaling More security Focus on features ✓ ✓ ✓ ✓ A full class of issues disappeared with the serverless migration The architecture and the infrastructure just scale Some components may need manual tuning We spend less time in maintaining the infrastructure, So we are more comfortable in adding new features We do not think about it anymore Remaining tasks are on database performance with business logic
  • 31. Lessons learned Aurora Serverless requires aVPC configuration Kinesis shards and Aurora units need manual tuning Full serverless is not always possible, hybrid approach should be kept in mind and integrated in infrastructure as code Fewer features with Aurora Serverless than with Amazon RDS equivalents Kinesis costs, even if not used Serverless still needs configuration Hybrid architecture Techno maturity Lambda can scale too much and be costly if bug in logic or architecture – set alarms and limits Control automatic scaling
  • 32.  State management  Monolithic container for functionality  One version, one server  Server is an atomic unit of thinking  The challenges of this model How do weuseServers?
  • 34. Features first Focus on Events Stateless Data-flow Use the Services Avoid monolithic thinking Events are triggers that cause action The key to scaling effectively Make data decisions early on Don’t reinvent the wheel GeneralApproach toThinkingServerless
  • 35. Attributes  Runs on demand  Supports many runtimes  Responds to events  Stateless  Automatically scales Best practices  Avoid lift-and-shift  One function per purpose  Keep functions small  Choose the right runtime for the job  Use functions for business logic and plumbing between services ✍️Understanding howAWS Lambda fitsin
  • 36.  Infrastructure is disposable  Asynchronous versus synchronous processing  You can mix and match runtimes  Security still matters: build in from the start  Automation  AWS Serverless Application Model (AWS SAM)  The AWS Cloud Development Kit (AWS CDK)  Serverless Framework ✍️GoodServerlesspractices
  • 37. 1. Form upload Create a serverless application to support a customer review form submitted from a webpage
  • 38. 1. Form upload Create a serverless application to support a customer review form submitted from a webpage Amazon API Gateway AWS Lambda Amazon DynamoDB
  • 39. 1. Form upload Create a serverless application to support a customer review form submitted from a webpage Amazon API Gateway AWS Lambda Amazon DynamoDB AWS Lambda Amazon Translate
  • 40. 1. Form upload Create a serverless application to support a customer review form submitted from a webpage AWS Lambda Amazon S3
  • 41. 1. Form upload Create a serverless application to support a customer review form submitted from a webpage AWS Lambda Amazon SNS Amazon Comprehend
  • 42. 1. Form upload Create a serverless application to support a customer review form submitted from a webpage Amazon Cognito Amazon API Gateway
  • 43. A global retailer wants to implement a virtual queue for customers. Use an IoT button to manage a “now serving” counter. 2.Createa virtualqueue
  • 44. A global retailer wants to implement a virtual queue for customers. Use an IoT button to manage a “now serving” counter. 2.Createa virtualqueue IoT button AWS IoT Core AWS Lambda Amazon DynamoDB AWS Lambda Amazon API Gateway Customer display
  • 45. A global retailer wants to implement a virtual queue for customers. Use an IoT button to manage a “now serving” counter. 2.Createa virtualqueue AWS Lambda AWS IoT Core Customer display
  • 46. A global retailer wants to implement a virtual queue for customers. Use an IoT button to manage a “now serving” counter. 2.Createa virtualqueue AWS Lambda Amazon S3 Amazon Polly
  • 47. A global retailer wants to implement a virtual queue for customers. Use an IoT button to manage a “now serving” counter. 2.Createa virtualqueue Amazon EventBridge rule (scheduled) AWS Lambda Amazon SNS
  • 48. A global retailer wants to implement a virtual queue for customers. Use an IoT button to manage a “now serving” counter. 2.Createa virtualqueue
  • 49. Create a serverless web application to support an e-commerce business  High volume, spiky, unpredictable traffic patterns  Geographically distributed  Requires high performance front-end, low latency 3.WebApplication
  • 50. Create a serverless web application to support a national e-commerce business 3.Web application Browser Amazon Route 53 AWS Amplify console GitHub repo
  • 51. Create a serverless web application to support a national e-commerce business 3.Web application Amazon Cognito Auth0
  • 52. Create a serverless web application to support a national e-commerce business 3.Web application Amazon API Gateway AWS Lambda Amazon S3 AWS Lambda Amazon S3 AWS Lambda Amazon DynamoDB
  • 58. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark © 2020, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverl ess vocabu lary Live Demo https://dashboard.job4u.io KPI Dashboard on AWS Data Ingestion API Operations  Runbook: logging, monitoring, alerting on issues  Scaling: how to scale Performance Dashboard  Security  Shared Responsibility between AWS & Customer  IP Blocking: limit access to come from an IP range (e.g. on-premises network)
  • 60. © 2021, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon Confidential and Trademark © 2020, AmazonWeb Services, Inc. or its affiliates. All rights reserved. Serverl ess vocabu lary LAB https://webapp.serverlessworkshops.io/ https://github.com/aws-samples/getting- started-with-serverless