Microservices and Event-Driven
Architecture on AWS
Dhaval Nagar
12x AWS Certified, AWS Serverless Hero
● 12x AWS, 2x GCP, Kubernetes, Docker Certified
● AWS Serverless Hero - 2020
● AWS Certification Subject Matter Expert (SME)
● AWS User Group Leader, Surat
● Founder - AppGambit (AWS Consulting Partner)
Agenda
● Introduction to Event-Driven Microservices
● AWS Services
● Demo (3 Demo Services)
● Q / A
● Summary
The microservice architectural style is an approach to developing a single
application as a suite of small services, each running in its own process
and communicating with lightweight mechanisms, often an HTTP resource
API.
Characteristics of a Microservice
What is Monolithic Application
● The whole application is built as a single unit
● Often divided in three main parts
○ Client-side application (consisting of HTML pages and javascript running in a browser)
○ Server-side Application (Business or Controller Layer)
○ Data (Database) Layer (consisting of many tables inserted into a common, and usually
relational, database management system)
● The server-side application will handle HTTP requests, execute domain
logic, retrieve and update data from the database, and select and
populate HTML views to be sent to the browser.
● This server-side application is a monolith - a single logical executable.
● Any changes to the system involve building and deploying a new version
of the server-side application.
What is the use case for Micro-services
● Monolithic application are not necessarily BAD
● It largely depends on the kind of the application, team size and number of
other factors like Performance and Scaling
● If you have just one application, your whole team is making code changes
in that
● Test cycles can be longer
● Scaling will have to consider the whole application, even though there are
only a few parts that requires more processing power
Monolithic vs Microservice Architecture
https://martinfowler.com/articles/microservices.html
Microservices != Containers (Docker)
● Containers is a (Packaging and) Delivery Mechanism
● Microservice is an Architectural Pattern
12 Factor App - Software As a Service
● Codebase in Version control
● Explicitly declare Dependencies
● Store configurations in environment
● Backing services as attached
resource
● Build, Release, Run
● Stateless processes
https://12factor.net/
● Export services via Port Binding
● Scale out via the process model
● Scale fast and shrink gracefully
● Keep Dev, Staging, and Production
environment similar
● Treat logs as Event stream
● Run admin processes separately
Microservices and AWS
● Compute
● Storage
● Database
● Networking and Service Discovery
● Messaging
● Logging and Monitoring
● Developer Tools
Microservices and AWS
● Compute
○ EC2 - Virtual Machine
○ ECS - Container Service
○ Lambda - Serverless Service
● Storage
○ S3 - Object Storage
○ EFS - Network File Storage
● Database
○ DynamoDB - NoSQL Database
○ RDS, Aurora - SQL Database
● Networking
○ Application Load Balancer
○ API Gateway - Managed API Proxy
○ AppSync - Managed GraphQL
● Service Discovery
○ Cloud Map - Service Discovery
● Messaging
○ SQS - Message Queue
○ SNS - Hyper scale Pub/Sub
○ EventBridge - Cloud Event Bus
○ Kinesis - Data Streaming
● Logging and Monitoring
○ CloudWatch - Distributed Logging
○ X-Ray - Distributed Tracing
● Developer Tools
○ ECR - Container Repository
○ CodeBuild -
○ CodePipeline -
Half of new apps built inside of Amazon this year are
using Lambda!
@ re:Invent 2020, Andy Jassy, ex-CEO, AWS
https://aws.amazon.com/blogs/aws/reinvent-2020-liveblog-andy-jassy-keynote/
● Upload functions and attach Triggers
● When Trigger runs, Lambda Service executes the Function
● You can run thousands of functions in parallel
Why Use Serverless!!
● No Server Management
● Flexible Scaling
● Highly Available
● Pay for Consumption
● Secure Environment
Lambda Service - Event-Driven Compute
Serverless Web Application
Web App is hosted on S3 APIs managed with API Gateway Data stored on
DynamoDB
How Lambda (Serverless) Works!
Synchronous Communication
Asynchronous Communication
Serverless Microservice Patterns at AWS
Simple API Request
https://www.jeremydaly.com/serverless-microservice-patterns-for-aws/
Scalable Webhook Request
Strangler Pattern - Route requests to Old and New
Applications
Common APIs - Integrating different microservices
Q / A
Demo #1 - Deploy Sync/Async HTTP(S) APIs
https://github.com/AppGambitStudio/GreatLearning-Serverless-Demos
Demo #2 - Process Data Files on S3 Asynchronously
https://github.com/AppGambitStudio/GreatLearning-Serverless-Demos
Demo #3 - Process Data updated in MongoDB Atlas
https://github.com/AppGambitStudio/GreatLearning-Serverless-Demos
When to (Not) Use
● Strong module boundaries - Focus
on business features
● Independent Deployment - Adhere
to DevOps practice
● Technology Diversity - Polyglot
Tech Stack
● Distribution - Everything is
distributed
● Eventual Consistency - Everything
is distributed (again)
● Operational Complexities -
Monitoring distributed resources
are hard
Summary
● Almost every popular service that you know uses Microservice pattern
● Reusability across business
● Adds resiliency into the whole application
● Simple to Deploy
● Easy to Scale
● It’s not a silver bullet - may not be required in every use case
Summary
Q / A
References
● Serverless Framework - http://serverless.com/
● AWS Serverless Application Model - https://aws.amazon.com/serverless/sam/
● AWS Event Driven Architecture -
https://aws.amazon.com/event-driven-architecture/
● Serverless on AWS - https://aws.amazon.com/serverless/
● Serverless Blogs - https://serverlessland.com/
● Serverless Framework vs SAM -
https://www.serverless.com/learn/comparisons/
Thank You!
https://linkedin.com/in/dhavaln
https://twitter.com/dhavaln
https://aws.amazon.com/developer/community/heroes/dhaval-nagar/

More Related Content

PDF
2022 Presentation | Serverless Innovation with AWS
PDF
Jumpstart your idea with AWS Serverless [Oct 2020]
PDF
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
PDF
Exposing Lambda Functions as Managed APIs
PDF
2016-06 - Design your api management strategy - AWS - Microservices on AWS
PPTX
Demistifying serverless on aws
PDF
SERVERLESS PERSONAL TO-DO LIST APPLICATION
PDF
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud
2022 Presentation | Serverless Innovation with AWS
Jumpstart your idea with AWS Serverless [Oct 2020]
Skillenza Build with Serverless Challenge - Advanced Serverless Concepts
Exposing Lambda Functions as Managed APIs
2016-06 - Design your api management strategy - AWS - Microservices on AWS
Demistifying serverless on aws
SERVERLESS PERSONAL TO-DO LIST APPLICATION
MongoDB World 2018: MongoDB and Cloud Foundry – A Match Made for the Cloud

Similar to GreatLearning Webinar - Microservices and Event-Driven Architecture.pdf (16)

PPTX
Serverlessusecase workshop feb3_v2
PDF
How to Build a Big Data Application: Serverless Edition
PDF
Deep Dive on Microservices and Docker
PPTX
Introduction to AWS & Cloud Services
PDF
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
PDF
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
PDF
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
PPTX
AWS Serverless with Lambda, ApiGateway
PDF
How to Build a Big Data Application: Serverless Edition
PDF
Getting Started with AWS Lambda and Serverless Computing
PDF
Cloud APIs Overview Tucker
PPTX
Primeros pasos en desarrollo serverless
PPTX
muCon 2017 - 12 Factor Serverless Applications
PDF
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
PDF
Agile Integration Workshop
PPTX
Building self service framework
Serverlessusecase workshop feb3_v2
How to Build a Big Data Application: Serverless Edition
Deep Dive on Microservices and Docker
Introduction to AWS & Cloud Services
Deploying Serverless Cloud Optical Character Recognition in Support of NASA A...
Serverless OCR for NASA EVA: AWS Meetup DC 2017-12-12
A Technology Backgrounder to Serverless Architecture - A Whitepaper by RapidV...
AWS Serverless with Lambda, ApiGateway
How to Build a Big Data Application: Serverless Edition
Getting Started with AWS Lambda and Serverless Computing
Cloud APIs Overview Tucker
Primeros pasos en desarrollo serverless
muCon 2017 - 12 Factor Serverless Applications
Serverless Optical Character Recognition in support of Astronaut Safety AWS M...
Agile Integration Workshop
Building self service framework
Ad

More from Dhaval Nagar (20)

PDF
AWS Simple Storage Service Overview [June 2019]
PDF
Building Public and Business Alexa Skills [Aug 2019]
PDF
Serverless Day Zero: How to Serveless [July 2019]
PDF
Serverless Meetup - Authentication for Serverless Applications [Jul 2020]
PDF
Serverless Meetup - Getting started with AWS Cognito [Jul 2020]
PDF
Getting Started with DevOps on AWS [Mar 2020]
PDF
How to Prepare for your next AWS Certification Meetup [Jan 2020]
PDF
Introduction to AWS Cloud Databases [Apr 2020]
PDF
Amazon EventBridge - Unlocking Event Driven Architecture in AWS [Nov 2020]
PDF
Building Multi-channel Bot using AWS Serverless
PDF
AWS Communities | Times Techie Webinar Bengaluru
PDF
Dhaval Nagar - ServerlessDays Bengaluru 2023
PDF
eChai Developer Meetup | Cloud Native Learnings with AWS
PDF
User Group Presentation | AWS 2022 Latest Release
PDF
2022 Presentation | Cloud Is The New Normal | Collage Students
PDF
✅ Managing Terabytes of Data with Amazon S3.pdf
PDF
Amazon Q Developer - For Developer Productivity
PDF
Leveraging AWS Serverless, Amazon Bedrock and Generative AI for Textile Patte...
PDF
Serverless Days Ahmedabad - Dhaval Nagar.pptx.pdf
PDF
Dhaval Nagar - AWS Community Day - Security Edition.pdf
AWS Simple Storage Service Overview [June 2019]
Building Public and Business Alexa Skills [Aug 2019]
Serverless Day Zero: How to Serveless [July 2019]
Serverless Meetup - Authentication for Serverless Applications [Jul 2020]
Serverless Meetup - Getting started with AWS Cognito [Jul 2020]
Getting Started with DevOps on AWS [Mar 2020]
How to Prepare for your next AWS Certification Meetup [Jan 2020]
Introduction to AWS Cloud Databases [Apr 2020]
Amazon EventBridge - Unlocking Event Driven Architecture in AWS [Nov 2020]
Building Multi-channel Bot using AWS Serverless
AWS Communities | Times Techie Webinar Bengaluru
Dhaval Nagar - ServerlessDays Bengaluru 2023
eChai Developer Meetup | Cloud Native Learnings with AWS
User Group Presentation | AWS 2022 Latest Release
2022 Presentation | Cloud Is The New Normal | Collage Students
✅ Managing Terabytes of Data with Amazon S3.pdf
Amazon Q Developer - For Developer Productivity
Leveraging AWS Serverless, Amazon Bedrock and Generative AI for Textile Patte...
Serverless Days Ahmedabad - Dhaval Nagar.pptx.pdf
Dhaval Nagar - AWS Community Day - Security Edition.pdf
Ad

Recently uploaded (20)

DOCX
search engine optimization ppt fir known well about this
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
WOOl fibre morphology and structure.pdf for textiles
PDF
August Patch Tuesday
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Five Habits of High-Impact Board Members
PPT
Geologic Time for studying geology for geologist
PDF
Architecture types and enterprise applications.pdf
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
Tartificialntelligence_presentation.pptx
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
PDF
Hindi spoken digit analysis for native and non-native speakers
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
CloudStack 4.21: First Look Webinar slides
PDF
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf
search engine optimization ppt fir known well about this
DP Operators-handbook-extract for the Mautical Institute
Assigned Numbers - 2025 - Bluetooth® Document
O2C Customer Invoices to Receipt V15A.pptx
WOOl fibre morphology and structure.pdf for textiles
August Patch Tuesday
Taming the Chaos: How to Turn Unstructured Data into Decisions
Five Habits of High-Impact Board Members
Geologic Time for studying geology for geologist
Architecture types and enterprise applications.pdf
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Tartificialntelligence_presentation.pptx
Zenith AI: Advanced Artificial Intelligence
Hybrid horned lizard optimization algorithm-aquila optimizer for DC motor
Hindi spoken digit analysis for native and non-native speakers
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
CloudStack 4.21: First Look Webinar slides
Microsoft Solutions Partner Drive Digital Transformation with D365.pdf

GreatLearning Webinar - Microservices and Event-Driven Architecture.pdf

  • 1. Microservices and Event-Driven Architecture on AWS Dhaval Nagar 12x AWS Certified, AWS Serverless Hero
  • 2. ● 12x AWS, 2x GCP, Kubernetes, Docker Certified ● AWS Serverless Hero - 2020 ● AWS Certification Subject Matter Expert (SME) ● AWS User Group Leader, Surat ● Founder - AppGambit (AWS Consulting Partner)
  • 3. Agenda ● Introduction to Event-Driven Microservices ● AWS Services ● Demo (3 Demo Services) ● Q / A ● Summary
  • 4. The microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API.
  • 5. Characteristics of a Microservice
  • 6. What is Monolithic Application ● The whole application is built as a single unit ● Often divided in three main parts ○ Client-side application (consisting of HTML pages and javascript running in a browser) ○ Server-side Application (Business or Controller Layer) ○ Data (Database) Layer (consisting of many tables inserted into a common, and usually relational, database management system) ● The server-side application will handle HTTP requests, execute domain logic, retrieve and update data from the database, and select and populate HTML views to be sent to the browser. ● This server-side application is a monolith - a single logical executable. ● Any changes to the system involve building and deploying a new version of the server-side application.
  • 7. What is the use case for Micro-services ● Monolithic application are not necessarily BAD ● It largely depends on the kind of the application, team size and number of other factors like Performance and Scaling ● If you have just one application, your whole team is making code changes in that ● Test cycles can be longer ● Scaling will have to consider the whole application, even though there are only a few parts that requires more processing power
  • 8. Monolithic vs Microservice Architecture https://martinfowler.com/articles/microservices.html
  • 9. Microservices != Containers (Docker) ● Containers is a (Packaging and) Delivery Mechanism ● Microservice is an Architectural Pattern
  • 10. 12 Factor App - Software As a Service ● Codebase in Version control ● Explicitly declare Dependencies ● Store configurations in environment ● Backing services as attached resource ● Build, Release, Run ● Stateless processes https://12factor.net/ ● Export services via Port Binding ● Scale out via the process model ● Scale fast and shrink gracefully ● Keep Dev, Staging, and Production environment similar ● Treat logs as Event stream ● Run admin processes separately
  • 11. Microservices and AWS ● Compute ● Storage ● Database ● Networking and Service Discovery ● Messaging ● Logging and Monitoring ● Developer Tools
  • 12. Microservices and AWS ● Compute ○ EC2 - Virtual Machine ○ ECS - Container Service ○ Lambda - Serverless Service ● Storage ○ S3 - Object Storage ○ EFS - Network File Storage ● Database ○ DynamoDB - NoSQL Database ○ RDS, Aurora - SQL Database ● Networking ○ Application Load Balancer ○ API Gateway - Managed API Proxy ○ AppSync - Managed GraphQL ● Service Discovery ○ Cloud Map - Service Discovery ● Messaging ○ SQS - Message Queue ○ SNS - Hyper scale Pub/Sub ○ EventBridge - Cloud Event Bus ○ Kinesis - Data Streaming ● Logging and Monitoring ○ CloudWatch - Distributed Logging ○ X-Ray - Distributed Tracing ● Developer Tools ○ ECR - Container Repository ○ CodeBuild - ○ CodePipeline -
  • 13. Half of new apps built inside of Amazon this year are using Lambda! @ re:Invent 2020, Andy Jassy, ex-CEO, AWS https://aws.amazon.com/blogs/aws/reinvent-2020-liveblog-andy-jassy-keynote/
  • 14. ● Upload functions and attach Triggers ● When Trigger runs, Lambda Service executes the Function ● You can run thousands of functions in parallel Why Use Serverless!! ● No Server Management ● Flexible Scaling ● Highly Available ● Pay for Consumption ● Secure Environment Lambda Service - Event-Driven Compute
  • 15. Serverless Web Application Web App is hosted on S3 APIs managed with API Gateway Data stored on DynamoDB
  • 22. Strangler Pattern - Route requests to Old and New Applications
  • 23. Common APIs - Integrating different microservices
  • 24. Q / A
  • 25. Demo #1 - Deploy Sync/Async HTTP(S) APIs https://github.com/AppGambitStudio/GreatLearning-Serverless-Demos
  • 26. Demo #2 - Process Data Files on S3 Asynchronously https://github.com/AppGambitStudio/GreatLearning-Serverless-Demos
  • 27. Demo #3 - Process Data updated in MongoDB Atlas https://github.com/AppGambitStudio/GreatLearning-Serverless-Demos
  • 28. When to (Not) Use ● Strong module boundaries - Focus on business features ● Independent Deployment - Adhere to DevOps practice ● Technology Diversity - Polyglot Tech Stack ● Distribution - Everything is distributed ● Eventual Consistency - Everything is distributed (again) ● Operational Complexities - Monitoring distributed resources are hard
  • 29. Summary ● Almost every popular service that you know uses Microservice pattern ● Reusability across business ● Adds resiliency into the whole application ● Simple to Deploy ● Easy to Scale ● It’s not a silver bullet - may not be required in every use case
  • 31. Q / A
  • 32. References ● Serverless Framework - http://serverless.com/ ● AWS Serverless Application Model - https://aws.amazon.com/serverless/sam/ ● AWS Event Driven Architecture - https://aws.amazon.com/event-driven-architecture/ ● Serverless on AWS - https://aws.amazon.com/serverless/ ● Serverless Blogs - https://serverlessland.com/ ● Serverless Framework vs SAM - https://www.serverless.com/learn/comparisons/