Skip to content

scripts: CI deploy role for code-only Lambda deploys (#1445) - #1449

Merged
scttfrdmn merged 1 commit into
mainfrom
feat/1445-ci-deploy-role
Oct 30, 2026
Merged

scttfrdmn merged 1 commit into
mainfrom
feat/1445-ci-deploy-role

Conversation

@scttfrdmn

Copy link
Copy Markdown
Contributor

Refs #1445. This is the role half only; the deploy workflow comes in a follow-up PR.

What

scripts/setup-lambda-deploy-ci-role.sh creates or updates GitHubActions-spawn-lambda-deploy in 966362334030. --delete is its named deleter.

Trust: the account's existing GitHub OIDC provider. aud = sts.amazonaws.com, sub = repo:spore-host/spawn:environment:production (StringEquals, no wildcard). Max session 1h.

Policy (DeployOperatedLambdaCode):

  • UpdateFunctionCode, GetFunction, GetFunctionConfiguration, ListTags on the 9 operated functions by exact ARN;
  • TagResource on the same functions, limited by aws:TagKeys to spawn:version/managed/component/created-by.

Nothing else: no IAM, no UpdateFunctionConfiguration, no mappings, no CloudFormation, no other account.

The production environment was created first, already protected:

  • required reviewer: the owner;
  • can_admins_bypass: false;
  • deployments from v* tags only.

The repo uses the default OIDC subject format (checked through the API), so the sub above is what such a job presents.

Gate

TestCIDeployRoleCoversTheOperatedFunctions (scripts/deploychecklist) keeps the script's FUNCTIONS equal to the operated functions discover() finds. I watched it fail when an extra function was added to the array.

make deploy-checklist FROM=v0.151.0 TO=<this branch> lists the script as an added manual input.

Checks

  • make check and make lint (0 issues, 10 modules): pass
  • semgrep and shellcheck: clean
  • scripts module tests: pass
  • root and iamcoverage tests: pass

Deploy

After merge, from main:

  1. dry run through a recording shim;
  2. simulate-custom-policy of the generated policy, allow and deny;
  3. the real run, which is itself the real PutRolePolicy;
  4. simulate-principal-policy on the live role.

The record goes on #1445.

@codecov

codecov Bot commented Oct 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@scttfrdmn
scttfrdmn merged commit 894f731 into main Oct 30, 2026
9 checks passed
@scttfrdmn
scttfrdmn deleted the feat/1445-ci-deploy-role branch October 30, 2026 20:32
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