I'm building a platform that requires holding a customer's card for about three days before a booking begins. Our backend is hosted on ECS, and we're considering using EventBridge to trigger jobs that will automatically place this hold and update our database. Additionally, we want to set up another job for retrying any failed payments after some time.
We're debating between AWS Lambda and Fargate tasks for this process. It seems like Lambda might be better since the tasks are short-lived, and it has a faster cold start time. However, I'm curious whether Lambda is commonly used for critical functions like payment processing or if it's mainly for less important tasks. Any thoughts?
4 Answers
It can fit well, but since you're fully on ECS, deploying a task there might be quicker than setting up Lambda for just one new function. Make sure to weigh those deployment times against your overall architecture.
Absolutely! Lambda is highly reliable and quick. We actually use it for integrating with our payment processor, and it's been 100% effective without needing any server management.
Yes, Lambda can do it, but consider how long it takes to get responses from the bank. You don’t want to end up paying for idle time while waiting. If you need to manage transaction states efficiently, think about using a database for state management and retries. SQS might be a better fit for managing failures alongside Lambda.
Definitely, Lambda is reliable for handling payment flows! Just remember to incorporate queues and Dead Letter Queues (DLQs) for any failed processes to avoid losing data.

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