---
title: "Comment by Peter Amalu on \"AWS Lambda and RDS Connection Nightmare (How I Got Out) 🧟‍♂️\" | Hashnode"
description: "Beautiful article Victor. Well-done. There is a small question I have with your design though. And that is: why did you use lambda for processing a CSV, especia"
url: "https://hashnode.com/posts/aws-lambda-and-rds-connection-nightmare-how-i-got-out/682d71613af49537c002266b/comment/682d73d6e5f0020ad6c6537d"
---

[Discussion](https://hashnode.com/posts/aws-lambda-and-rds-connection-nightmare-how-i-got-out/682d71613af49537c002266b)

Comment [AWS Lambda and RDS Connection Nightmare (How I Got Out) 🧟‍♂️](https://hashnode.com/posts/aws-lambda-and-rds-connection-nightmare-how-i-got-out/682d71613af49537c002266b)

[Peter Amalu](https://hashnode.com/@amalupeter)

[May 21, 2025](https://hashnode.com/posts/aws-lambda-and-rds-connection-nightmare-how-i-got-out/682d71613af49537c002266b/comment/682d73d6e5f0020ad6c6537d)

Beautiful article Victor. Well-done. There is a small question I have with your design though. And that is: why did you use lambda for processing a CSV, especially one which seems like it was heavy. Didn't Lambda timeout after some seconds? Why not use EC2 and a CRON job and stream this file from S3. You could have used eventbridge to start and stop this instance if you are worried about it running all the time and racking up cost.

[Victor Anuebunwa](https://hashnode.com/@AVONnadozie)

[May 21, 2025](https://hashnode.com/posts/aws-lambda-and-rds-connection-nightmare-how-i-got-out/682d71613af49537c002266b/comment/682d73d6e5f0020ad6c6537d#reply-682d7734e83139d771baf5af)

Great question. Your stack option is pretty good as well. It all depends on your requirements.

For our use case, Lambda looked to be the best option. Lambda timeout is 15 minutes, and that's enough time to read most files. The problem comes from the processing, and we did that in chunks using SQS.
