2 Answers
- Newest
- Most votes
- Most comments
0
Hmm, very interesting. I hadn't considered using a separate state machine like this. Looks nice, I'll definitely investigate!
I can't see why they didn't carry the waiter architecture forward more quickly but in the interim I stuck a blocking poll every 0.2s ... feels hacky but it works until I find a better way :)
Thanks,
David
answered 9 months ago
0
The best way to handle this would be to move the workflow logic into AWS Step Functions. Here is an example state machine which submits a job, waits, polls for job status, then waits again if needed. Step Functions will give you built-in error handling and retry capabilities.
See Serverless Workflows Collection for more examples and templates
answered 9 months ago
Relevant content
- asked 5 years ago
- Accepted Answerasked a year ago
- Accepted Answerasked 4 months ago
- Accepted Answerasked 2 years ago
- How can I use a Lambda function to automatically start an AWS Glue job when a crawler run completes?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
You could absolutely place the wait within your function but while the code pauses you're still paying for the function's execution cost. (see Synchronous waiting)
Any reason not to manage function configuration changes through CI/CD? https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/serverless-deploying.html