Context: We have two aws state machines that run after midnight eastern standard time. one restores production data to a reporting environment then restarts it, the other downloads snapshots to local storage.
Issue: these step functions run nightly, and will error if they encounter the api while it is in maintenance.
Idea: to have some way to allow the first step of these state machines to check for maintenance either in progress or scheduled to begin within a hour. If we had such an option, the state machine can postpone its execution until such a time as the maintenance is complete
Do we have any API exposed for this purpose as we are also trying to implement the similar usecase?
Store maintenance schedule flag in a central place – e.g., DynamoDB, SSM Parameter Store, or AWS Maintenance Window (SSM).Ref: AWS Systems Manager Maintenance Windows
Expose maintenance status API – small Lambda + API Gateway that returns:
inProgress: true/false
scheduledWithinHour: true/false
Add Step Function task before start – first state calls this API (or reads SSM param).Ref: Step Functions → Call API
Branch logic in the state machine:
If inProgress
or scheduledWithinHour
→ go to a Wait
state (e.g., 30 min) then retry.
Else → continue with restore/snapshot workflow.Ref: Step Functions Wait State
Automation – Ops team updates the flag (or maintenance window) before/after maintenance so the check is always correct.
We can achieve this by Create a Lambda function that checks Mendix's maintenance status by Calling Mendix's API for maintenance status (if available) - Or checking a predefined maintenance schedule stored in AWS Systems.