Skip to content

feat(iam): grant SSM SendCommand on dashboard instance for auto-deploy#278

Merged
cipher813 merged 1 commit into
mainfrom
feat/iam-ssm-dashboard-deploy
May 20, 2026
Merged

feat(iam): grant SSM SendCommand on dashboard instance for auto-deploy#278
cipher813 merged 1 commit into
mainfrom
feat/iam-ssm-dashboard-deploy

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

Extends github-actions-lambda-deploy (the cross-cutting OIDC role assumed by every alpha-engine-* GHA deploy workflow) with ssm:SendCommand scoped to the dashboard instance (i-09b539c844515d549) + the AWS-RunShellScript document, plus ssm:GetCommandInvocation for polling.

Unblocks alpha-engine-dashboard PR auto-deploy (separate PR opens once this merges). Pattern mirrors the existing lambda deploys: PR merge → GHA workflow → SSM → instance pulls + restarts streamlit services → health check.

Why this role, not a new one

github-actions-lambda-deploy is already cross-cutting by design (per infrastructure/iam/README.md), already includes infra-deploy actions (CloudFormation, SNS, scheduler, etc.) despite the name, and its OIDC trust already permits cipher813/alpha-engine-dashboard:main. Single role is the lower-ceremony choice for a 1-dev project. If the dashboard deploy ever needs blast-radius isolation, splitting is mechanical.

Apply.sh ran pre-merge

Per the add-grant discipline ([[feedback_apply_sh_iam_drift_check_inverts_timing]]) — codified must match live before the drift-check CI can pass on this PR:

$ bash infrastructure/iam/apply.sh github-actions-lambda-deploy
Applying github-actions-lambda-deploy.json -> role=github-actions-lambda-deploy policy=github-actions-lambda-deploy-policy
  OK
$ python3 infrastructure/iam/check-drift.py
OK: no IAM drift for alpha-engine-eventbridge-sfn-role, alpha-engine-step-functions-role, github-actions-lambda-deploy

Test plan

  • apply.sh executed cleanly
  • check-drift.py reports no drift
  • CI drift-check workflow passes on this PR
  • Post-merge: open alpha-engine-dashboard PR with the new deploy workflow + verify the workflow assumes the role successfully on a workflow_dispatch test run

🤖 Generated with Claude Code

…board instance

Two new statements:
- DashboardDeployViaSSM: ssm:SendCommand scoped to the dashboard
  instance (i-09b539c844515d549) + the AWS-RunShellScript document.
- DashboardDeployPollCommand: ssm:GetCommandInvocation +
  ListCommandInvocations on `*` (no resource-level scoping available
  for these APIs).

Enables alpha-engine-dashboard PR auto-deploy (separate PR opens once
this lands). Mirrors the existing lambda-deploy pattern: PR merge →
GHA workflow → SSM → instance pulls + restarts streamlit services →
health check.

OIDC trust already permits cipher813/alpha-engine-dashboard:main, so
no trust-policy edit needed.

Applied via infrastructure/iam/apply.sh pre-merge per the
add-grant-PR-needs-apply-first discipline (drift check would block
merge otherwise). Live drift check passes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit 9bb16b3 into main May 20, 2026
2 checks passed
@cipher813 cipher813 deleted the feat/iam-ssm-dashboard-deploy branch May 20, 2026 22:24
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