SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
How to build a full stack
serverless airline booking application
Heitor Lessa
Principal Serverless Lead, Well-Architected
OCT24TH
@heitor_lessa
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
What we’re not going to cover
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS operational responsibility models
On-Premises Cloud
Less More
Compute Virtual Machine
Amazon EC2 AWS Elastic Beanstalk AWS LambdaFargate
Databases MySQL
MySQL on EC2 Amazon RDS MySQL Amazon Aurora Aurora Serverless
Storage Storage
Amazon S3
Messaging ESBs
Amazon MQ Amazon Kinesis
Analytics
Hadoop Hadoop on EC2 Amazon EMR Amazon Elasticsearch Service Amazon Athena
Amazon QLDB / DynamoDB
Amazon Event Bridge / SNS / SQS
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Full-Stack Developer
Full-Stack Builder
Full-Stack Builder
Builder
Generate yours at dev.to/rly
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Ideation & exploration
Mood BoardInspiration Colour
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Initial sketches
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Initial tech stack
API
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prototyping – CSS attempt #1
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prototyping – CSS attempt #2
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prototyping – CSS attempt #459092384
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prototyping – CSS attempt # 459092385
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Prototyping - Impressions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Authentication
OpenID provider
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Authentication
Auth HOC
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tech stack - updated
API
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Data modelling & assumptions
flight data booking data loyalty data
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API – GraphQL Types
Flight type Booking type Loyalty type
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API – GraphQL Transformer
GraphQL Transformers
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API – GraphQL Transformer
GraphQL Transformers
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API – GraphQL Transformer
GraphQL Transformers
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API: Front-end integration
Client library
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Client Amazon S3
Website
Quasar Vue.js
Front-end
Amazon
CloudFront
API
Vuex Modules
Catalog
STATE GETTERS
MUTATIONS ACTIONS
Booking
STATE GETTERS
MUTATIONS ACTIONS
Loyalty
STATE GETTERS
MUTATIONS ACTIONS
Profile
STATE GETTERS
MUTATIONS ACTIONS
API: Front-end integration
APIAPIAPI
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
API – GraphQL Server
AWS AppSync Amazon DynamoDB
Resolver
CRUD, put simply
Compute
Data source
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Payment – Stripe Elements
Elements via iframe
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Payment – Stripe JS
JS card tokenization
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Payment integration – back-end
Amazon API Gateway AWS Lambda
API
JS create charge
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tech stack - updated
API
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations – CI/CD
Console
CI/CD for full stack Serverless apps and more
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations – Tracing
Distributed tracing
AWS X-Ray
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations – Custom Metrics
Monitoring
Amazon CloudWatch
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations – Structured logging
Structured logging
logging
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Operations – Correlation ID via Amplify client
Correlation ID
HTTP headers
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Perf test – Memory tuning plus switch to Regional API
Retrieve profile
P99 – 802ms to 237ms
Min – 246ms to 70ms
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Catalog – Fetching flights
AWS AppSync
API
Vuex Modules
Catalog
fetchFlight
Amazon DynamoDB
VTL
Catalog
Resolver
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Payment – Charges and refunds
API
Amazon API Gateway AWS Lambda
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Booking – Processing new bookings
AWS AppSync
API
Vuex Modules
Booking
processBooking
Process Booking
State Machine
AWS Step Functions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Booking – State Machine
Process Booking
State Machine
AWS Step Functions
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Airline Web App – Front-end: Booking
AWS AppSync
API
Vuex Modules
Booking
listBookings
Booking
Amazon DynamoDB
Resolver
Amazon DynamoDB
VTL
Catalog
Resolver
VTL
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Airline Web App – Front-end: Loyalty
AWS AppSync
API
Vuex Modules
Loyalty
fetchLoyalty
AWS Lambda
Loyalty
Amazon
DynamoDB
Amazon
API Gateway
Resolver
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Airline Web App – Front-end: Loyalty
AWS AppSync
API
Vuex Modules
Loyalty
fetchLoyalty
Resolver
Amazon DynamoDB
Amazon SNS
AWS Lambda
Booking
Calculate Loyalty points
AWS Lambda
Loyalty
Amazon
DynamoDB
Amazon
API Gateway
BOOKING CONFIRMED
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Airline Web App – High-level architecture
Client
Amazon S3
Website
Amazon
CloudFront
AWS AppSync
API
Resolver
Amazon
DynamoDB
Amazon SNS
AWS
Step Functions
Booking
Quasar Vue.js
Front-end
Payment
SYNC
API
Amazon API Gateway AWS Lambda
Amazon DynamoDB
VTL
Catalog
AWS Lambda
Loyalty
Amazon
DynamoDB
Amazon
API Gateway
AWS LambdaAutomation & Monitoring
Amazon
CloudWatch
AWS
CloudFormation
AWS X-RayAWS CDKAWS Amplify
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Airline Web App – High-level architecture
Client
Amazon S3
Website
Amazon
CloudFront
AWS AppSync
API
Resolver
Amazon
DynamoDB
Amazon SNS
AWS
Step Functions
Booking
Quasar Vue.js
Front-end
Payment
SYNC
API
Amazon API Gateway AWS Lambda
Amazon DynamoDB
VTL
Catalog
AWS Lambda
Loyalty
Amazon
DynamoDB
Amazon
API Gateway
AWS LambdaAutomation & Monitoring
Amazon CloudWatchAWS CloudFormation AWS X-RayAWS Amplify
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Summary - Repository
aws-samples
aws-serverless-airline-booking
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Takeaway
Code is liability
Focus on business
Modularize
Amplify
Serverless
Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Heitor Lessa
Principal Serverless Lead, Well-Architected
@heitor_lessa
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Resources
Ten Tips And Tricks for
Improving Your GraphQL API
with AWS AppSync
(MOB401)
Authentication &
Authorization in GraphQL
with AWS AppSync
(MOB402)
The Future of Enterprise
Applications is Serverless
(ENT314-R1)
Serverless Architectural
Patterns and Best Practices
(ARC305-R2)

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Unleash the Power of ML with AWS | AWS Summit Tel Aviv 2019
Unleash the Power of ML with AWS | AWS Summit Tel Aviv 2019Unleash the Power of ML with AWS | AWS Summit Tel Aviv 2019
Unleash the Power of ML with AWS | AWS Summit Tel Aviv 2019
 
Serverless APIs and you
Serverless APIs and youServerless APIs and you
Serverless APIs and you
 
Simplify your Web & Mobile applications with cloud-based serverless backends
Simplify your Web & Mobile applicationswith cloud-based serverless backendsSimplify your Web & Mobile applicationswith cloud-based serverless backends
Simplify your Web & Mobile applications with cloud-based serverless backends
 
Developing intelligent robots with AWS RoboMaker - SVC207 - New York AWS Summit
Developing intelligent robots with AWS RoboMaker - SVC207 - New York AWS SummitDeveloping intelligent robots with AWS RoboMaker - SVC207 - New York AWS Summit
Developing intelligent robots with AWS RoboMaker - SVC207 - New York AWS Summit
 
AWS DevDay Berlin 2019 - Simplify your Web & Mobile apps with cloud-based ser...
AWS DevDay Berlin 2019 - Simplify your Web & Mobile appswith cloud-based ser...AWS DevDay Berlin 2019 - Simplify your Web & Mobile appswith cloud-based ser...
AWS DevDay Berlin 2019 - Simplify your Web & Mobile apps with cloud-based ser...
 
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructureAWS Summit Stockholm - Fargate: deploy containers, not infrastructure
AWS Summit Stockholm - Fargate: deploy containers, not infrastructure
 
Building A Cloud-Native Advanced Logistics Ecosystem
Building A Cloud-Native Advanced Logistics EcosystemBuilding A Cloud-Native Advanced Logistics Ecosystem
Building A Cloud-Native Advanced Logistics Ecosystem
 
From 0 to Blue-Green deployments on AWS Fargate
From 0 to Blue-Green deployments on AWS Fargate From 0 to Blue-Green deployments on AWS Fargate
From 0 to Blue-Green deployments on AWS Fargate
 
AWS App Sync (DC Startup Week 2019)
AWS App Sync (DC Startup Week 2019)AWS App Sync (DC Startup Week 2019)
AWS App Sync (DC Startup Week 2019)
 
Security and governance with AWS Control Tower and AWS Organizations - SEC204...
Security and governance with AWS Control Tower and AWS Organizations - SEC204...Security and governance with AWS Control Tower and AWS Organizations - SEC204...
Security and governance with AWS Control Tower and AWS Organizations - SEC204...
 
Websites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit BerlinWebsites go Serverless - AWS Summit Berlin
Websites go Serverless - AWS Summit Berlin
 
Building Private API’s for Security Automation at Monash University
Building Private API’s for Security Automation at Monash UniversityBuilding Private API’s for Security Automation at Monash University
Building Private API’s for Security Automation at Monash University
 
Accelerating App Development with AWS Amplify
Accelerating App Development with AWS AmplifyAccelerating App Development with AWS Amplify
Accelerating App Development with AWS Amplify
 
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless BackendsAWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
AWS Meetup Brussels 3rd Sep 2019 Simplify Frontend Apps with Serverless Backends
 
Software delivery best practices: Lessons from Amazon and our customers - MAD...
Software delivery best practices: Lessons from Amazon and our customers - MAD...Software delivery best practices: Lessons from Amazon and our customers - MAD...
Software delivery best practices: Lessons from Amazon and our customers - MAD...
 
Create an ML Factory in Financial Services with CI/CD - FSI301 - Toronto AWS ...
Create an ML Factory in Financial Services with CI/CD - FSI301 - Toronto AWS ...Create an ML Factory in Financial Services with CI/CD - FSI301 - Toronto AWS ...
Create an ML Factory in Financial Services with CI/CD - FSI301 - Toronto AWS ...
 
Introduction to AWS Amplify CLI
Introduction to AWS Amplify CLIIntroduction to AWS Amplify CLI
Introduction to AWS Amplify CLI
 
"How to build real-time backends", Martin Beeby, AWS Dev Day Kyiv 2019
"How to build real-time backends", Martin Beeby, AWS Dev Day Kyiv 2019"How to build real-time backends", Martin Beeby, AWS Dev Day Kyiv 2019
"How to build real-time backends", Martin Beeby, AWS Dev Day Kyiv 2019
 
Increase the value of video using ML and AWS media services - SVC301 - Atlant...
Increase the value of video using ML and AWS media services - SVC301 - Atlant...Increase the value of video using ML and AWS media services - SVC301 - Atlant...
Increase the value of video using ML and AWS media services - SVC301 - Atlant...
 
Build your APPs in Lean and Agile Way using AWS Amplify
Build your APPs in Lean and Agile Way using AWS AmplifyBuild your APPs in Lean and Agile Way using AWS Amplify
Build your APPs in Lean and Agile Way using AWS Amplify
 

Similar a Serverless days Stockholm - How to build a full-stack airline ticketing web app

Similar a Serverless days Stockholm - How to build a full-stack airline ticketing web app (20)

How to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdfHow to build a FullStack Airline Ticketing Web App.pdf
How to build a FullStack Airline Ticketing Web App.pdf
 
GraphQL backend with AWS AppSync & AWS Lambda
GraphQL backend with AWS AppSync & AWS LambdaGraphQL backend with AWS AppSync & AWS Lambda
GraphQL backend with AWS AppSync & AWS Lambda
 
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Integrate your front end apps with serverless backend in the cloud", Sebasti..."Integrate your front end apps with serverless backend in the cloud", Sebasti...
"Integrate your front end apps with serverless backend in the cloud", Sebasti...
 
Serverless Observability Tech Talk
Serverless Observability Tech TalkServerless Observability Tech Talk
Serverless Observability Tech Talk
 
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
Amplifying fullstack serverless apps with AppSync & the Amplify Framework - M...
 
Serverless applications with AWS
Serverless applications with AWSServerless applications with AWS
Serverless applications with AWS
 
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
20190402 AWS Black Belt Online Seminar Let's Dive Deep into AWS Lambda Part1 ...
 
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
Next generation intelligent data lakes, powered by GraphQL & AWS AppSync - MA...
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
 
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
Building a fully serverless application on AWS | AWS Summit Tel Aviv 2019
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
 
Getting Started with Serverless Architectures
Getting Started with Serverless ArchitecturesGetting Started with Serverless Architectures
Getting Started with Serverless Architectures
 
[NEW LAUNCH!] Introducti[NEW LAUNCH!] Introduction to event-driven architectu...
[NEW LAUNCH!] Introducti[NEW LAUNCH!] Introduction to event-driven architectu...[NEW LAUNCH!] Introducti[NEW LAUNCH!] Introduction to event-driven architectu...
[NEW LAUNCH!] Introducti[NEW LAUNCH!] Introduction to event-driven architectu...
 
Tools for building your Startup on AWS
Tools for building your Startup on AWSTools for building your Startup on AWS
Tools for building your Startup on AWS
 
Cloud Backend for Real-time Applications
Cloud Backend for Real-time ApplicationsCloud Backend for Real-time Applications
Cloud Backend for Real-time Applications
 
Continuous Delivery on AWS with Zero Downtime
Continuous Delivery on AWS with Zero DowntimeContinuous Delivery on AWS with Zero Downtime
Continuous Delivery on AWS with Zero Downtime
 
Simplify front end apps.pdf
Simplify front end apps.pdfSimplify front end apps.pdf
Simplify front end apps.pdf
 
AWSome Day 2019 - Mexico City
AWSome Day 2019 - Mexico CityAWSome Day 2019 - Mexico City
AWSome Day 2019 - Mexico City
 
AWS Startup Day Bogotá - Tools for Building Your Startup
AWS Startup Day Bogotá - Tools for Building Your StartupAWS Startup Day Bogotá - Tools for Building Your Startup
AWS Startup Day Bogotá - Tools for Building Your Startup
 
Building-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
Building-Event-Driven-Serverless-Apps-with-AWS-Event-ForkinesBuilding-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
Building-Event-Driven-Serverless-Apps-with-AWS-Event-Forkines
 

Más de Heitor Lessa

Organising time effectively
Organising time effectivelyOrganising time effectively
Organising time effectively
Heitor Lessa
 

Más de Heitor Lessa (8)

re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent ARC307 - Serverless architectural patterns and best practices.pdfre:Invent ARC307 - Serverless architectural patterns and best practices.pdf
re:Invent ARC307 - Serverless architectural patterns and best practices.pdf
 
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdfre:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
re:Invent OPN306 AWS Lambda Powertools Lessons 10M downloads.pdf
 
AWS Lambda Powertools walkthrough.pdf
AWS Lambda Powertools walkthrough.pdfAWS Lambda Powertools walkthrough.pdf
AWS Lambda Powertools walkthrough.pdf
 
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
AWS Community Day Ireland - Building roads and bridges in the last decade of ...AWS Community Day Ireland - Building roads and bridges in the last decade of ...
AWS Community Day Ireland - Building roads and bridges in the last decade of ...
 
AWS Community Day Ireland - Refactoring a serverless app
AWS Community Day Ireland - Refactoring a serverless appAWS Community Day Ireland - Refactoring a serverless app
AWS Community Day Ireland - Refactoring a serverless app
 
AWS Lambda Powertools
AWS Lambda PowertoolsAWS Lambda Powertools
AWS Lambda Powertools
 
Serverless best practices plus design principles 20m version
Serverless   best practices plus design principles 20m versionServerless   best practices plus design principles 20m version
Serverless best practices plus design principles 20m version
 
Organising time effectively
Organising time effectivelyOrganising time effectively
Organising time effectively
 

Último

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

Serverless days Stockholm - How to build a full-stack airline ticketing web app

  • 1. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. How to build a full stack serverless airline booking application Heitor Lessa Principal Serverless Lead, Well-Architected OCT24TH @heitor_lessa
  • 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. What we’re not going to cover
  • 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS operational responsibility models On-Premises Cloud Less More Compute Virtual Machine Amazon EC2 AWS Elastic Beanstalk AWS LambdaFargate Databases MySQL MySQL on EC2 Amazon RDS MySQL Amazon Aurora Aurora Serverless Storage Storage Amazon S3 Messaging ESBs Amazon MQ Amazon Kinesis Analytics Hadoop Hadoop on EC2 Amazon EMR Amazon Elasticsearch Service Amazon Athena Amazon QLDB / DynamoDB Amazon Event Bridge / SNS / SQS
  • 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Full-Stack Developer Full-Stack Builder Full-Stack Builder Builder Generate yours at dev.to/rly
  • 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Ideation & exploration Mood BoardInspiration Colour
  • 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Initial sketches
  • 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Initial tech stack API
  • 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prototyping – CSS attempt #1
  • 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prototyping – CSS attempt #2
  • 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prototyping – CSS attempt #459092384
  • 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prototyping – CSS attempt # 459092385
  • 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Prototyping - Impressions
  • 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Authentication OpenID provider
  • 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Authentication Auth HOC
  • 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tech stack - updated API
  • 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Data modelling & assumptions flight data booking data loyalty data
  • 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. API – GraphQL Types Flight type Booking type Loyalty type
  • 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. API – GraphQL Transformer GraphQL Transformers
  • 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. API – GraphQL Transformer GraphQL Transformers
  • 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. API – GraphQL Transformer GraphQL Transformers
  • 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. API: Front-end integration Client library
  • 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Client Amazon S3 Website Quasar Vue.js Front-end Amazon CloudFront API Vuex Modules Catalog STATE GETTERS MUTATIONS ACTIONS Booking STATE GETTERS MUTATIONS ACTIONS Loyalty STATE GETTERS MUTATIONS ACTIONS Profile STATE GETTERS MUTATIONS ACTIONS API: Front-end integration APIAPIAPI
  • 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. API – GraphQL Server AWS AppSync Amazon DynamoDB Resolver CRUD, put simply Compute Data source
  • 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Payment – Stripe Elements Elements via iframe
  • 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Payment – Stripe JS JS card tokenization
  • 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Payment integration – back-end Amazon API Gateway AWS Lambda API JS create charge
  • 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Tech stack - updated API
  • 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations – CI/CD Console CI/CD for full stack Serverless apps and more
  • 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations – Tracing Distributed tracing AWS X-Ray
  • 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations – Custom Metrics Monitoring Amazon CloudWatch
  • 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations – Structured logging Structured logging logging
  • 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Operations – Correlation ID via Amplify client Correlation ID HTTP headers
  • 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Perf test – Memory tuning plus switch to Regional API Retrieve profile P99 – 802ms to 237ms Min – 246ms to 70ms
  • 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Catalog – Fetching flights AWS AppSync API Vuex Modules Catalog fetchFlight Amazon DynamoDB VTL Catalog Resolver
  • 47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Payment – Charges and refunds API Amazon API Gateway AWS Lambda
  • 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Booking – Processing new bookings AWS AppSync API Vuex Modules Booking processBooking Process Booking State Machine AWS Step Functions
  • 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Booking – State Machine Process Booking State Machine AWS Step Functions
  • 50. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Airline Web App – Front-end: Booking AWS AppSync API Vuex Modules Booking listBookings Booking Amazon DynamoDB Resolver Amazon DynamoDB VTL Catalog Resolver VTL
  • 51. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Airline Web App – Front-end: Loyalty AWS AppSync API Vuex Modules Loyalty fetchLoyalty AWS Lambda Loyalty Amazon DynamoDB Amazon API Gateway Resolver
  • 52. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Airline Web App – Front-end: Loyalty AWS AppSync API Vuex Modules Loyalty fetchLoyalty Resolver Amazon DynamoDB Amazon SNS AWS Lambda Booking Calculate Loyalty points AWS Lambda Loyalty Amazon DynamoDB Amazon API Gateway BOOKING CONFIRMED
  • 53. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Airline Web App – High-level architecture Client Amazon S3 Website Amazon CloudFront AWS AppSync API Resolver Amazon DynamoDB Amazon SNS AWS Step Functions Booking Quasar Vue.js Front-end Payment SYNC API Amazon API Gateway AWS Lambda Amazon DynamoDB VTL Catalog AWS Lambda Loyalty Amazon DynamoDB Amazon API Gateway AWS LambdaAutomation & Monitoring Amazon CloudWatch AWS CloudFormation AWS X-RayAWS CDKAWS Amplify
  • 54. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Airline Web App – High-level architecture Client Amazon S3 Website Amazon CloudFront AWS AppSync API Resolver Amazon DynamoDB Amazon SNS AWS Step Functions Booking Quasar Vue.js Front-end Payment SYNC API Amazon API Gateway AWS Lambda Amazon DynamoDB VTL Catalog AWS Lambda Loyalty Amazon DynamoDB Amazon API Gateway AWS LambdaAutomation & Monitoring Amazon CloudWatchAWS CloudFormation AWS X-RayAWS Amplify
  • 55. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 56. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 57. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Summary - Repository aws-samples aws-serverless-airline-booking
  • 58. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Takeaway Code is liability Focus on business Modularize Amplify Serverless
  • 59. Thank you! © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Heitor Lessa Principal Serverless Lead, Well-Architected @heitor_lessa
  • 60. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
  • 61. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved. Resources Ten Tips And Tricks for Improving Your GraphQL API with AWS AppSync (MOB401) Authentication & Authorization in GraphQL with AWS AppSync (MOB402) The Future of Enterprise Applications is Serverless (ENT314-R1) Serverless Architectural Patterns and Best Practices (ARC305-R2)