I'm working on a Flutter app that I'd like to make collaborative and allow for real-time interactions. Currently, I'm using DynamoDB and API Gateway with Lambda functions for the backend, but I think switching to GraphQL along with WebSockets and AppSync might be more effective than making API calls every minute. I'm looking for advice on the most cost-efficient AWS tech stack to facilitate real-time collaboration, especially considering that each client might be connected for 8-10 hours a day over 28-30 days a month. I'm also considering adding a feature to disconnect when idle.
3 Answers
That sounds quick, but I'm not sure it's the most cost-effective option. The cost per connection time for API Gateway can be higher than for AppSync. With your ambitious usage plans, cost savings should definitely be a priority. I almost went for setting up my own WebSocket server on EC2, but I also like the scalability that a managed service like AppSync offers.
AppSync and GraphQL are solid choices, but keep in mind that switching might mean rethinking your current architecture. If you want to get up and running fast, AWS API Gateway supports WebSockets too. You can create a long-lasting channel between the client and API Gateway. Just remember, with this setup, you will need to handle some boilerplate code for connections and might consider using DynamoDB for tracking those connections.
AppSync is definitely the way to go, especially with their recent update for bi-directional communication. Plus, they have a Flutter SDK now, which makes things easier for your app.

Related Questions
How To: Running Codex CLI on Windows with Azure OpenAI
Set Wordpress Featured Image Using Javascript
How To Fix PHP Random Being The Same
Why no WebP Support with Wordpress
Replace Wordpress Cron With Linux Cron
Customize Yoast Canonical URL Programmatically