SlideShare a Scribd company logo
1 of 46
Download to read offline
Building a
serverless event
driven Slack Bot
Jimmy Dahlqvist
Øredev - 2022-11-09
@jimmydahlqvist
Agenda
Background
Event-driven architecture
Pizza Bot (Demo)
Summary and conclusion
@jimmydahlqvist
Hello, I'm
JIMMY DAHLQVIST
Father of two girls
Serverless enthusiast
AWS Ambassador
AWS Community Builder
Head of AWS Technologies at Sigma Technology Cloud
Background
Use Case - Pizzeria
@jimmydahlqvist
Online Pizza order
Order service Bake service
@jimmydahlqvist
Online order
Order Service
Payment Service
Delivery Service
Bake service
@jimmydahlqvist
Downstream error
Order Service
Payment Service
Delivery Service
Bake service
@jimmydahlqvist
Order canceled
Order Service
Payment Service
Delivery Service
Bake service
@jimmydahlqvist
Order canceled
Order Service
Payment Service
Delivery Service
Bake service
Loyalty Service
Event-driven architecture with
Amazon EventBridge
@jimmydahlqvist
Event
A signal to indicate that
something has
changed or happened.
• Immutable
• Observable
• Facts
• JSON
@jimmydahlqvist
Observable
Data changed
OK
OK Gothca
OK
@jimmydahlqvist
Online order
Order service
Payment service
Delivery service
Bake service
Loyalty service
@jimmydahlqvist
No pineapple
Order service
Payment service
Delivery service
Bake service
Loyalty service
@jimmydahlqvist
Luigi has a great idea!
Order service
Payment service
Delivery service
Bake service
Loyalty service
Tracking service
@jimmydahlqvist
No pineapple
Order service
Payment service
Delivery service
Bake service
Loyalty service
Tracking service
@jimmydahlqvist
Summary event-driven architecture
• Actions are being observed
• Services are loosely coupled
• Easy to extend
Services deep dive
@jimmydahlqvist
Amazon EventBridge
• Fully managed and serverless
• 15+ AWS services as target
• API destinations
• EventBridge to EventBridge
• Easy to build event-driven architecture
• Low price
@jimmydahlqvist
Event bus patterns
Single Bus (Centralized)
Multi Bus (Decentralized)
@jimmydahlqvist
Centralized
Advantages
• Centralized routing and resource management
• Easy to integrate new application
Disadvantages
• Single point of failure
• Leaking business logic
@jimmydahlqvist
Single bus pattern
• Good place to start
AWS account
Order Service
Delivery Service
Bake Service
@jimmydahlqvist
Decentralized (Distributed)
Advantages
• No single point of failure
• Enables autonomy
Disadvantages
• Challenge to design
• More resources to manage
@jimmydahlqvist
Multi bus pattern
• Each service owns its bus
• No centrally managed routing
AWS account
Order Service
Delivery Service
Bake Service
@jimmydahlqvist
Default event bus
• One per region and AWS account
• Leave it alone!
• Create your own custom buses
@jimmydahlqvist
Create subscriptions
Creates coupling on the filter
Complex to add more targets
Changing the filter affect all
Coupling is on the event
Easy to add more targets
Filters can change independently
@jimmydahlqvist
AWS StepFunctions
• Resilient workflow automation
• Built-in error handling
• Cost effective
• Powerful service integrations
@jimmydahlqvist
Service integrations
Optimized integrations
• 15+ service integrations
• Customized to optimize and simplify
usage of supported AWS services
AWS SDK integrations
• 200+ SDK integrations
• Call a wide range of services using
9000+ API actions.
@jimmydahlqvist
Workflow types
Express workflow
• Short running – 5 minutes
• 100K starts per second
• Pay for duration
Standard workflow
• Long running - 1 year
• 2000 starts per second
• Pay per state transition
@jimmydahlqvist
Intrinsic functions
• Perform basic data manipulation
• 15+ functions
@jimmydahlqvist
Task
• Single Unit of work
• All work is done by tasks
@jimmydahlqvist
Choice
• Controls the flow in the state machine
• Powerful comparison operations
• Support catch all else (Default) path
@jimmydahlqvist
Pass
• State that will just be passed through
• Use when END is not directly supported
@jimmydahlqvist
Wait
• Specified number of seconds
• Timestamp has passed
• Can be a variable in the event
Demo – Online Pizzeria
What are we building
@jimmydahlqvist
Slack webhook – In place
@jimmydahlqvist
Notification Service – In Place
@jimmydahlqvist
Order Service
@jimmydahlqvist
Bake Service
Demo – Online Pizzeria
@jimmydahlqvist
Summary
• Serverless and event-driven architecture
• Event-driven Slack bot
@jimmydahlqvist
@jimmydahlqvist
https://www.linkedin.com/in/dahlqvistjimmy/
https://jimmydqv.com | https://dev.to/jimmydqv
THANK YOU

More Related Content

Similar to Building a serverless event driven Slack Bot

Building real-time data analytics on Google Cloud
Building real-time data analytics on Google CloudBuilding real-time data analytics on Google Cloud
Building real-time data analytics on Google CloudJonny Daenen
 
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)Amazon Web Services
 
Integration with Dynamics 365 / Power Platform
Integration with Dynamics 365 / Power PlatformIntegration with Dynamics 365 / Power Platform
Integration with Dynamics 365 / Power PlatformRémy van Duijkeren
 
IoT enable smoker for great BBQ
IoT enable smoker  for great BBQIoT enable smoker  for great BBQ
IoT enable smoker for great BBQJimmy Dahlqvist
 
Autoscaled Github Runners using StepFunctions
Autoscaled Github Runners using StepFunctionsAutoscaled Github Runners using StepFunctions
Autoscaled Github Runners using StepFunctionsJimmy Dahlqvist
 
Introduction to testing in Cloud / AWS
Introduction to testing in Cloud / AWSIntroduction to testing in Cloud / AWS
Introduction to testing in Cloud / AWSJimmy Dahlqvist
 
AppStream - Beyond the obvious
AppStream - Beyond the obviousAppStream - Beyond the obvious
AppStream - Beyond the obviousÁdám Ócsvári
 
High Volume Streaming Data: How Amazon Web Services is Changing Our Approach
High Volume Streaming Data: How Amazon Web Services is Changing Our ApproachHigh Volume Streaming Data: How Amazon Web Services is Changing Our Approach
High Volume Streaming Data: How Amazon Web Services is Changing Our ApproachMichael Krouze
 
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...Codit
 
Crio.do - Deployment on AWS Masterclass
Crio.do - Deployment on AWS MasterclassCrio.do - Deployment on AWS Masterclass
Crio.do - Deployment on AWS MasterclassDhaval Nagar
 
Google cloud big data summit master gcp big data summit la - 10-20-2015
Google cloud big data summit   master gcp big data summit la - 10-20-2015Google cloud big data summit   master gcp big data summit la - 10-20-2015
Google cloud big data summit master gcp big data summit la - 10-20-2015Raj Babu
 
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...Codit
 
Google Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline PatternsGoogle Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline PatternsLynn Langit
 
Building a [micro]services platform on AWS
Building a [micro]services platform on AWSBuilding a [micro]services platform on AWS
Building a [micro]services platform on AWSShaun Pearce
 
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...SnapLogic
 
Journey to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverlessJourney to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverlessYan Cui
 
Keynote speech
Keynote speechKeynote speech
Keynote speechBizTalk360
 
Serverless cloud architecture patterns
Serverless cloud architecture patternsServerless cloud architecture patterns
Serverless cloud architecture patternsJimmy Dahlqvist
 

Similar to Building a serverless event driven Slack Bot (20)

Building real-time data analytics on Google Cloud
Building real-time data analytics on Google CloudBuilding real-time data analytics on Google Cloud
Building real-time data analytics on Google Cloud
 
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
 
Integration with Dynamics 365 / Power Platform
Integration with Dynamics 365 / Power PlatformIntegration with Dynamics 365 / Power Platform
Integration with Dynamics 365 / Power Platform
 
IoT enable smoker for great BBQ
IoT enable smoker  for great BBQIoT enable smoker  for great BBQ
IoT enable smoker for great BBQ
 
Autoscaled Github Runners using StepFunctions
Autoscaled Github Runners using StepFunctionsAutoscaled Github Runners using StepFunctions
Autoscaled Github Runners using StepFunctions
 
Introduction to testing in Cloud / AWS
Introduction to testing in Cloud / AWSIntroduction to testing in Cloud / AWS
Introduction to testing in Cloud / AWS
 
AppStream - Beyond the obvious
AppStream - Beyond the obviousAppStream - Beyond the obvious
AppStream - Beyond the obvious
 
High Volume Streaming Data: How Amazon Web Services is Changing Our Approach
High Volume Streaming Data: How Amazon Web Services is Changing Our ApproachHigh Volume Streaming Data: How Amazon Web Services is Changing Our Approach
High Volume Streaming Data: How Amazon Web Services is Changing Our Approach
 
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
Het Microsoft Integratie Platform – Welk model past u het beste? (Steef Jan W...
 
Gluecon keynote
Gluecon keynoteGluecon keynote
Gluecon keynote
 
Crio.do - Deployment on AWS Masterclass
Crio.do - Deployment on AWS MasterclassCrio.do - Deployment on AWS Masterclass
Crio.do - Deployment on AWS Masterclass
 
Google cloud big data summit master gcp big data summit la - 10-20-2015
Google cloud big data summit   master gcp big data summit la - 10-20-2015Google cloud big data summit   master gcp big data summit la - 10-20-2015
Google cloud big data summit master gcp big data summit la - 10-20-2015
 
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
Cloud integration: what's in it for you? (Toon Vanhoutte & Massimo Crippa at ...
 
Google Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline PatternsGoogle Cloud and Data Pipeline Patterns
Google Cloud and Data Pipeline Patterns
 
Building a [micro]services platform on AWS
Building a [micro]services platform on AWSBuilding a [micro]services platform on AWS
Building a [micro]services platform on AWS
 
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
Weathering the Data Storm – How SnapLogic and AWS Deliver Analytics in the Cl...
 
ITV& Bashton
ITV& Bashton ITV& Bashton
ITV& Bashton
 
Journey to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverlessJourney to the cloud, the why and how of serverless
Journey to the cloud, the why and how of serverless
 
Keynote speech
Keynote speechKeynote speech
Keynote speech
 
Serverless cloud architecture patterns
Serverless cloud architecture patternsServerless cloud architecture patterns
Serverless cloud architecture patterns
 

More from Jimmy Dahlqvist

Building a serverless AI powered translation service
Building a serverless AI powered translation serviceBuilding a serverless AI powered translation service
Building a serverless AI powered translation serviceJimmy Dahlqvist
 
AI Powered event-driven translation bot
AI Powered event-driven translation botAI Powered event-driven translation bot
AI Powered event-driven translation botJimmy Dahlqvist
 
re:Invent Recap Breakfast
re:Invent Recap Breakfastre:Invent Recap Breakfast
re:Invent Recap BreakfastJimmy Dahlqvist
 
CHAOS ENGINEERING – OR LET'S SHAKE THE TREE
CHAOS ENGINEERING – OR LET'S SHAKE THE TREECHAOS ENGINEERING – OR LET'S SHAKE THE TREE
CHAOS ENGINEERING – OR LET'S SHAKE THE TREEJimmy Dahlqvist
 
Road to an asynchronous device registration API
Road to an asynchronous device registration APIRoad to an asynchronous device registration API
Road to an asynchronous device registration APIJimmy Dahlqvist
 
GitOps in action, powered by Alexa.
GitOps in action, powered by Alexa.GitOps in action, powered by Alexa.
GitOps in action, powered by Alexa.Jimmy Dahlqvist
 

More from Jimmy Dahlqvist (6)

Building a serverless AI powered translation service
Building a serverless AI powered translation serviceBuilding a serverless AI powered translation service
Building a serverless AI powered translation service
 
AI Powered event-driven translation bot
AI Powered event-driven translation botAI Powered event-driven translation bot
AI Powered event-driven translation bot
 
re:Invent Recap Breakfast
re:Invent Recap Breakfastre:Invent Recap Breakfast
re:Invent Recap Breakfast
 
CHAOS ENGINEERING – OR LET'S SHAKE THE TREE
CHAOS ENGINEERING – OR LET'S SHAKE THE TREECHAOS ENGINEERING – OR LET'S SHAKE THE TREE
CHAOS ENGINEERING – OR LET'S SHAKE THE TREE
 
Road to an asynchronous device registration API
Road to an asynchronous device registration APIRoad to an asynchronous device registration API
Road to an asynchronous device registration API
 
GitOps in action, powered by Alexa.
GitOps in action, powered by Alexa.GitOps in action, powered by Alexa.
GitOps in action, powered by Alexa.
 

Recently uploaded

Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...BookNet Canada
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationDianaGray10
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneUiPathCommunity
 
Arti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdfArti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdfwill854175
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Software Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerSoftware Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerAnchore
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Memoori
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfROWELL MARQUINA
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxKunal Gupta
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024BookNet Canada
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
Introduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxIntroduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxmprakaash5
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 

Recently uploaded (20)

Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
Transcript: Green paths: Learning from publishers’ sustainability journeys - ...
 
Women in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automationWomen in Automation 2024: Career session - explore career paths in automation
Women in Automation 2024: Career session - explore career paths in automation
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
WomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyoneWomenInAutomation2024: AI and Automation for eveyone
WomenInAutomation2024: AI and Automation for eveyone
 
Arti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdfArti Languages Pre Seed Pitchdeck 2024.pdf
Arti Languages Pre Seed Pitchdeck 2024.pdf
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Software Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey HightowerSoftware Security in the Real World w/Kelsey Hightower
Software Security in the Real World w/Kelsey Hightower
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!Laying the Data Foundations for Artificial Intelligence!
Laying the Data Foundations for Artificial Intelligence!
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdfHCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
HCI Lesson 1 - Introduction to Human-Computer Interaction.pdf
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Dublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptxDublin_mulesoft_meetup_API_specifications.pptx
Dublin_mulesoft_meetup_API_specifications.pptx
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
Green paths: Learning from publishers’ sustainability journeys - Tech Forum 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
Introduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptxIntroduction-to-Wazuh-and-its-integration.pptx
Introduction-to-Wazuh-and-its-integration.pptx
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 

Building a serverless event driven Slack Bot

Editor's Notes

  1. Welcome so great to see so many people in here today! During the next 40 minutes we are going dive deep into event-driven architecture in a microservice setup. We will look at some of the services that can be used in AWS to build out such a architecture. And we are going to dp a demo and build an event-driven slack bot. My name is Jimmy and this is Building a serverless event driven Slack Bot
  2. The agenda for today.
  3. As said My name is jimmy. I’m father two girls, not afraid of anything…. Serverless, Ambassador…
  4. More and more teams build distributed SW using Micro Services, I’m rather sure that many of you in here is doing that as well. In such a distributed system the services need a way to communicate with each other. Often we do that using synch API and rest calls. This can however post a challenge as the system grows and we have more and more communication paths added. Services start to being more and more couple and need to know about each other. Often we add a Orchestration service like AWS Stepfunctions CLICK
  5. Synchronous API integration, let me illustrate that with me telling my children to brush their teeth.
  6. Not that bad? But what if we have a downstream service? Asking youngest to also tell the oldest
  7. So now I need to find a way to solve this, normally including The Mom….. So using Orchestration, and a service like AWS Stepfunctions can help.
  8. In a MS world we often integrate services using synch API. Building loosly coupled services integrating with an well defined API. Start with one not that bad…. Then two….
  9. Almost looks like a classic monolith with very tight couplings. Gone is the loosly coupled services that we want.
  10. So let’s take a deeper look at this using a made up online Pizzeria. The pizzeria is run by two brothers, Mario and Luigi. Yes they left the plumbing industry and started a pizzeria!
  11. Order online
  12. Flow Customer Order –> Order Service call the other services! Adding orchestration
  13. Downstream error…..
  14. NO Pineapple error flow!
  15. Error flow! Luigi had introduce a Loyalty service!
  16. What is an event!!
  17. What do I mean with Observable?
  18. No Pinapple error flow! So easy!
  19. Extending is easy!
  20. Before we jump into our demo and build this pizzeria order flow as an event-driven slack bot, let’s look at the services we will use.
  21. Talk about 2 types of patterns, centralized and de-centralized (Single / Mulyi Bus) Single and Multi Account All the patterns allow us to decouple the publisher from the subscriber. The service that publish doesn’t really need to know who is listening in the other end.
  22. Look at centralized advantnages and disadvantages Advantages allow you to manage all routiing, security and polciies in one place, single deployment) All routing centralized, concentrating all communication to a single event bus ( Enables central management of resources Allows you to easy integrate applications with few changes. Disadvantages As number of intregrations grow so does the complexity and resource utlilization. Can become a Single point of failure. All routing is centralized…. Prevents autonomy Single point of failure
  23. Caresteristics……
  24. In all of our patterns we have three services……. Events flow though a central bus. Handle by an infrastructure team (or similar) Easy to manage, easy to get started and easy to integrate new services. But as said before, when ## of integrations grow so does the complexity. Can hinder autonomy since there is a central managed resource, probably managed by infra team.
  25. In a decentralized approach routing is spread across multiple event buses and the publisher often becomes the logical owner of that bus. The service owns the mechanism to distribute the events. Even if more buses are more work from a operational approach it enables autonomy and doesn’t become a single point of failure On the other hand, designing distributed systems, managing all resources, can become a huge challenge if not done properly from the start. Applying this as an afterthought is almost impossible. So the time to get started might be longer, integration of new services and applications require more change and take more time.
  26. Caresteristics……
  27. Now each service own its own bus and publishes to that. Interested services can now subscribe for events in each service that they are interested in. Since we are in single account we can target resources in each service, cross service boundries. No need for extra busses, One thing that can become a problem is thar since there is no central bus, each service need to know about other services buses. This can quickly become a complex integration and onboarding new services can take time. Imagine in a system with10, 20, 100 services that you are interested in events from
  28. I normally recommend that you create subscriptions, so each service that is interested in an event creates its own rule, One Rule One target. Yes there is support for 5 targets That would create coupling on filter and not event!
  29. When building on eventbridge I would recommend that you create subscriptions. With that I mean that you create one event rule for one target. Even if EB support up to 5 targets per rule I still say this should be a 1-2-1 mapping. Why? If you create one rule with multiple targets you will create a coupling on the event filter. And if you hit the 5 target limit what are you suppose to do then? Create a second rule with the same filter and start adding new targets? What if you need to update the filter? You will impact several targets that might not be what you wanted to do in the first place, leaving you to start breaking things apart again. So instead we create subscriptions where we create the coupling on the event it self, and we set one target for one rule. It’s easy to add more target, just create a second rule and add the target to it. And the filter in every rule can change without affecting any other target. However…. This of course can lead to several rules having the same filter and that could create problems on it’s own. But in my opinion it’s still better to create subscriptions and deal with a rule explosion.
  30. Before we jump into our demo and build this pizzeria order flow as an event-driven slack bot, let’s look at the services we will use.