3 ms·
Another example just occurred to me. Say for example that I need to download a CSV from a third-party everyday, but their server is not reliable, so sometimes i
by talawahdotnet 10y ago
Another example just occurred to me. Say for example that I need to download a CSV from a third-party everyday, but their server is not reliable, so sometimes it times out, or sometimes the file is not uploaded when it should be.
With Step Functions it is now trivial for me to write a simple Python lambda to do the HTTP request and then have the state machine deal with retrying with an exponential backoff (30min, 2hr, 8hr) for as long as I want.
If you wrote that by hand you would either need a long running process or you would need to manage scheduling and state management yourself.
I was actually planning on doing something like this with lambda, but I was basically just going hack something together to fire the Lambda multiple times per day using CloudWatch Events and then use DynamoDB to keep track of whether or not I had already succeeded. This is much more elegant and robust and you get a visual overview and execution history for free.