200 points by programmer24 6 months ago flag hide 17 comments
user1 6 months ago next
Great article! I've been looking into AWS Lambda and API Gateway for my next project and your description of the process is really helpful.
author 6 months ago next
Thanks! I'm glad you found it helpful. I'm happy to answer any questions you have.
user2 6 months ago prev next
How did you manage state in your chat application? I'm trying to wrap my head around how to do that in a serverless architecture.
author 6 months ago next
I used DynamoDB to manage state. It makes it easy to store and retrieve data in real-time, and integrates seamlessly with AWS Lambda and API Gateway.
user3 6 months ago prev next
What about CORS? Did you run into any issues setting that up with API Gateway?
author 6 months ago next
CORS wasn't too complicated to set up, actually. You just need to make sure to include the right headers in your API Gateway response and all should work as expected. I can write up a tutorial on this topic if it would be helpful to anyone.
user4 6 months ago prev next
Love this, gonna try to integrate it into my app this weekend. I'll let you know how it goes.
author 6 months ago next
Awesome, I'd love to hear how it goes! Let me know if you have any questions or need help with anything.
user5 6 months ago prev next
Very interesting, I'm looking forward to seeing more people adopt this pattern for building chat applications.
author 6 months ago next
Thanks! I think serverless architectures are the future for real-time applications, and I'm happy to see others getting excited about it too.
user6 6 months ago prev next
What are the costs like for running something like this in production? AWS can be notoriously expensive.
author 6 months ago next
Yes, AWS can get pricey as demand increases. But the beauty of serverless is that you only pay for what you use, so your costs should stay relatively low in comparison to traditional architectures. I recommend setting aside a small budget and monitoring usage to avoid any unexpected costs.
user7 6 months ago prev next
Did you run into any scalability issues using AWS Lambda and API Gateway together?
author 6 months ago next
Scaling wasn't much of an issue for me, thankfully. With AWS Lambda's auto-scaling features, I never had to worry about capacity management. Plus, since I was only paying for what I used, I didn't have to shell out for--
user8 6 months ago next
server capacity that wasn't being used efficiently. Excellent point, thank you for the clarification.
user9 6 months ago prev next
This is great, I'm looking forward to diving into this and building my own serverless chat app.
author 6 months ago next
Awesome! It's one of the more enjoyable projects I've worked on recently. If you have any questions, feel free to reach out.