API201_Serverlesspresso-Building-event-driven-applications-from-the-start
API201_Serverlesspresso-Building-event-driven-applications-from-the-start
API201
Serverlesspresso:
Building event-driven
applications from the start
Benjamin Smith
Principal Developer Advocate, Serverless
AWS
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Agenda
Coding
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
General housekeeping
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The AWS services you will be using today
Developer tooling
AWS Management AWS CloudShell
Console
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS re:Invent Multiple AWS Summits and developer
1,920 orders events around the world
71 drinks per hour
3 minutes and 34 seconds of further reading
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS re:Invent 2022
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Setup – The core resources
AWS account
REST API
Events
Display API Lambda DynamoDB
app Gateway function table
Events
Publisher service
WebSocket
API
Barista Events
app AWS Lambda
IoT Core function
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today’s adventure
• Setup
Deploy the backend core resources
• Module 1: Building the workflow
Build the order processing workflow that manages the drink orders
through production
• Module 2: Routing events
Create event rules to route events across microservices
• Module 3: Configuring the frontends
Configure the frontend applications to connect to the backend that
you’ve built so far, and send some test orders
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless systems scale easily – Humans don’t
Barista
Order
Order
app
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Order processor service
Orchestrates each order from start to completion
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS Step Functions
FULLY MANAGED STATE MACHINES ON AWS
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today’s adventure
• Setup
Deploy the backend core resources
• Module 1: Building the workflow
Build the order processing workflow that manages the drink orders
through production
• Module 2: Routing events
Create event rules to route events across microservices
• Module 3: Configuring the frontends
Configure the frontend applications to connect to the backend that
you’ve built so far, and send some test orders
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Communicating between microservices
USING AMAZON EVENTBRIDGE FOR CHOREOGRAPHING MICROSERVICES
AWS Cloud
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Serverless – pay only for the
Amazon events you process
EventBridge • Simplified scaling avoids
increasing costs of sustaining and
A serverless event bus service managing resources
for AWS services, your own
applications, and SaaS • No upfront investments, ongoing
providers licensing, or maintenance costs
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Today’s adventure
• Setup
Deploy the backend core resources
• Module 1: Building the workflow
Build the order processing workflow that manages the drink orders
through production
• Module 2: Routing events
Create event rules to route events across microservices
• Module 3: Configuring the frontends
Configure the frontend applications to connect to the backend that
you’ve built so far, and send some test orders
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
The frontend applications
VUE.JS APPS HOSTED WITH AWS AMPLIFY CONSOLE
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Handling async responses
with real-time updates
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Using AWS IoT Core for real-time messaging
Frontend uses AWS SDK to subscribe to a topic based on user’s unique user ID
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Using AWS IoT Core for real-time messaging
Messages
2 Publishing
AWS SDK Messages IoT topic
function
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Using AWS IoT Core for real-time messaging
3 Messages
Publishing
AWS SDK Messages IoT topic
function
Messages are categorized using topics; topic names are UTF-8 encoded strings
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Let’s get started: https://s12d.com/api201
1. Email one-time password 3. Review terms and join event
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
#serverlesspresso
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank you! Please complete the session
survey in the mobile app
Benjamin Smith
@Benjamin_l_s
© 2023, Amazon Web Services, Inc. or its affiliates. All rights reserved.