Skip to content

feat: add executor SSM steps to daily Step Function#9

Merged
cipher813 merged 1 commit into
mainfrom
feat/step-function-executor-ssm
Apr 9, 2026
Merged

feat: add executor SSM steps to daily Step Function#9
cipher813 merged 1 commit into
mainfrom
feat/step-function-executor-ssm

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

  • Step Function previously ended at StartExecutorEC2 — relied entirely on systemd boot triggers
  • This fails on re-runs when instance is already running (systemd only triggers on cold boot)
  • Added: WaitForInstanceReady → RunMorningPlanner → WaitForMorningPlanner → RunDaemon
  • Fixed IAM: split SSM permissions so GetCommandInvocation gets Resource: *, SendCommand scoped to both instances

Test plan

  • Valid JSON
  • 13 trading calendar tests pass
  • Step Function deployed to AWS
  • IAM policy updated with trading instance SSM + GetCommandInvocation permissions

🤖 Generated with Claude Code

Step Function previously ended at StartExecutorEC2 and relied on systemd
boot triggers to run the executor. This fails on re-runs when the instance
is already running (systemd only triggers on cold boot).

Added:
- WaitForInstanceReady (120s boot wait)
- RunMorningPlanner (SSM: executor/main.py with IB Gateway wait)
- WaitForMorningPlanner + CheckMorningPlannerStatus (SSM polling loop)
- RunDaemon (SSM: systemctl restart daemon)
- PipelineComplete (fallback if daemon restart fails)

Also fixed IAM: split SSM into SendCommand (scoped to both instances) and
GetCommandInvocation (requires Resource: *), matching earlier fix that was
only applied at runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit 02fb9f5 into main Apr 9, 2026
1 check passed
@cipher813 cipher813 deleted the feat/step-function-executor-ssm branch April 9, 2026 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant