reate a movie voting application using AWS AppSync, AWS Lambda, AWS Step Functions, and Amazon DynamoDB. Leverage back-end and client facing real-time broadcasting with managed GraphQL subscriptions over WebSockets. AWS Cloud 1 Amazon CloudWatch Events 6 GraphQL Subscriptions (WebSocket Connection) GraphQL Subscriptions (WebSocket Connection) Web/Mobile Clients 7 AWS AppSync 4 5 Amazon DynamoDB (Movies) 8 9 Amazon DynamoDB (Votes w/ Atomic Counter) Local Resolver (Messages) AWS Step Functions 2 AWS Lambda 3 https://github.com/aws-samples/appsync-refarch-realtime Reviewed for technical accuracy March 24, 2021 © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. AWS Reference Architecture 1 2 3 4 5 6 7 8 9 Amazon CloudWatch Events initiate a workflow in AWS Step Functions every 60 seconds. AWS Step Functions trigger AWS Lambda every 10 seconds. Lambda calls The Movie DB API to retrieve metadata for a single random movie from the most popular movies list. Lambda updates the Movie table, zeroes current votes, and upvotes the leaderboard in the Votes table via GraphQL mutations to AppSync. AppSync updates the Movie table with the single current movie retrieved from Lambda. All connected clients subscribed to the back-end mutation see the same current movie poster and synopsis on screen (broadcast). Clients vote on the current movie during a 10-second window, and can send and receive chat messages in a public chatroom. Lambda updates the leaderboard and client’s movie votes via AppSync mutations. The public chatroom displays current messages on a pub/sub channel via Local Resolver. Messages are not persisted on back-end storage, only