Skip to content

fix(iam): grant deploy role update + invoke on regime Lambdas#239

Merged
cipher813 merged 1 commit into
mainfrom
fix/iam-drift-github-actions-lambda-deploy-create-perms
May 14, 2026
Merged

fix(iam): grant deploy role update + invoke on regime Lambdas#239
cipher813 merged 1 commit into
mainfrom
fix/iam-drift-github-actions-lambda-deploy-create-perms

Conversation

@cipher813
Copy link
Copy Markdown
Owner

Summary

The codified github-actions-lambda-deploy policy missed the two regime Lambdas added 2026-05-14:

  • alpha-engine-predictor-regime-substrate (Stage A)
  • alpha-engine-predictor-regime-retrospective-eval (Stage C.2 T1)

Symptom

Today's predictor deploy.yml run (CI 25884911718) logged "NOT FOUND — skipping" for both functions in deploy.sh Step 9 + 10. That branch was protective at the time (the functions hadn't been created yet via the setup scripts), but it masked the fact that even if they DID exist, the deploy role couldn't update them.

Fix

Add explicit ARNs to two statements:

  • LambdaUpdate (CreateFunction / UpdateFunctionCode / PublishVersion / UpdateAlias / CreateAlias — needed for auto-create + update path)
  • LambdaInvokeCanary (InvokeFunction on both bare + versioned ARNs — needed for deploy.sh's post-update dry_run canary)

Composes with parallel alpha-engine-predictor PR that adds create-function fall-through to deploy.sh Step 9 + 10, so the manual setup-regime-{lambda,retrospective-eval-lambda}.sh operator step becomes break-glass-only.

Applied + verified

bash infrastructure/iam/apply.sh github-actions-lambda-deploy
  → Applying ... OK
python3 infrastructure/iam/check-drift.py
  → OK: no IAM drift
pytest tests/test_sf_iam_lambda_grants.py
  → 2 passed, 1 skipped

🤖 Generated with Claude Code

The codified github-actions-lambda-deploy policy missed the two
regime Lambdas added 2026-05-14:
  - alpha-engine-predictor-regime-substrate (Stage A)
  - alpha-engine-predictor-regime-retrospective-eval (Stage C.2 T1)

Symptom: today's predictor deploy.yml run (CI 25884911718) logged
"NOT FOUND — skipping" for both functions in deploy.sh Step 9 + 10.
That branch was protective at the time (the functions hadn't been
created yet via setup-regime-{lambda,retrospective-eval-lambda}.sh).
But adding the ARNs now unblocks the auto-create fall-through being
shipped in alpha-engine-predictor (parallel PR) so the manual
setup scripts become break-glass-only rather than required.

Both Lambdas need explicit ARNs in two statements:
  - LambdaUpdate (CreateFunction / UpdateFunctionCode / PublishVersion
    / UpdateAlias / CreateAlias — needed for auto-create + update path)
  - LambdaInvokeCanary (InvokeFunction on both bare + versioned ARNs —
    needed for deploy.sh's post-update dry_run canary)

Applied to live AWS via:
  bash infrastructure/iam/apply.sh github-actions-lambda-deploy

Verified:
  python3 infrastructure/iam/check-drift.py → clean
  pytest tests/test_sf_iam_lambda_grants.py → 2 passed, 1 skipped

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cipher813 cipher813 merged commit 0a7f1ad into main May 14, 2026
2 checks passed
@cipher813 cipher813 deleted the fix/iam-drift-github-actions-lambda-deploy-create-perms branch May 14, 2026 21:37
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