Skip to content

feat(runners): add runner_config_ssm_parameter_tier to override the SSM tier - #5589

Open
officialasishkumar wants to merge 1 commit into
github-aws-runners:mainfrom
officialasishkumar:feat/runner-config-ssm-parameter-tier
Open

officialasishkumar wants to merge 1 commit into
github-aws-runners:mainfrom
officialasishkumar:feat/runner-config-ssm-parameter-tier

Conversation

@officialasishkumar

Copy link
Copy Markdown

Description

Adds an optional runner_config_ssm_parameter_tier input to control the SSM Parameter Store tier used for the runner registration token / JIT config parameters written by the scale-up and pool Lambdas.

Today the tier is always chosen from the value: Advanced for values of 4000 bytes or more (or when ssm_ttl_seconds.tokens is set), Standard otherwise. With the new input:

  • null (default): unchanged, size-based selection.
  • "Standard" / "Advanced": that tier is always used for the runner config parameters; the size-based decision is skipped.

Only the runner config writes (JIT config and registration token) are affected, in both the scale-up and the pool Lambda.

Changes:

  • aws-ssm-util: putParameter takes an optional tier that takes precedence over the automatic selection. Standard combined with a TTL is rejected, since expiration policies require the Advanced tier.
  • storage-providers: new SSM_RUNNER_CONFIG_TIER environment variable, parsed like SSM_TOKEN_TTL_SECONDS (empty = unset, invalid values fail fast) and passed to the runner config store.
  • Terraform: validated runner_config_ssm_parameter_tier variable in the root and modules/runners, wired to the scale-up Lambda and, via the pool config, to the pool Lambda. A precondition on the scale-up Lambda rejects Standard together with ssm_ttl_seconds.tokens at plan time.
  • modules/multi-runner: runner_config.runner_config_ssm_parameter_tier (stable shape) and storage_provider.aws.ssm.runner_config_tier (v2 shape), passed through to the runners module.
  • Docs: docs/configuration.md describes the option, with an example and the caveat that forcing Standard fails for values above the Standard tier size limit (4 KB). Module READMEs updated.

Test Plan

  • Unit tests (vitest) added/updated in lambdas/libs/aws-ssm-util and lambdas/libs/storage-providers: env parsing, store passing the tier, putParameter honouring an explicit tier regardless of value size, and the Standard + TTL rejection (no SSM call made). aws-ssm-util (24) and storage-providers (158) suites pass; eslint and prettier are clean.
  • terraform test in modules/runners (12 runs pass): default leaves SSM_RUNNER_CONFIG_TIER unset on both Lambdas, an explicit value reaches both the scale-up and pool Lambdas, an invalid value and Standard + token TTL are rejected, Advanced + token TTL is accepted.
  • terraform test in modules/multi-runner (21 runs pass), with assertions that the stable and v2 shapes carry the tier into the effective config.
  • terraform fmt -check -recursive and terraform validate on the root module.

Related Issues

Fixes #5544

…SM tier

The scale-up and pool Lambdas write the runner registration token / JIT
config to SSM Parameter Store and always pick the parameter tier
themselves: Advanced when the value is 4000 bytes or larger or a token
TTL is configured, Standard otherwise. Deployments with strict tier
governance (for example no Advanced parameters because of their cost)
had no way to control this.

Add an optional `runner_config_ssm_parameter_tier` input (`null`,
`Standard` or `Advanced`, default `null`). When set, it is passed to both
Lambdas as SSM_RUNNER_CONFIG_TIER and used as the tier of the runner
config parameters instead of the automatic selection. Unset keeps the
current behaviour. Only the runner config writes are affected.

- aws-ssm-util: putParameter accepts an optional `tier`, which takes
  precedence over the size/TTL based selection. An explicit Standard
  tier combined with a TTL is rejected, since expiration policies need
  the Advanced tier.
- storage-providers: parse SSM_RUNNER_CONFIG_TIER (empty means unset,
  anything other than Standard/Advanced fails fast) and pass it to the
  runner config store.
- Terraform: new variable in the root and runners modules (validated),
  wired to the scale-up Lambda and, through the pool config, the pool
  Lambda. A precondition on the scale-up Lambda rejects Standard together
  with `ssm_ttl_seconds.tokens` at plan time.
- multi-runner: `runner_config.runner_config_ssm_parameter_tier` for the
  stable shape and `storage_provider.aws.ssm.runner_config_tier` for the
  v2 shape, passed through to the runners module.
- Tests for the parsing, the store, putParameter and the Terraform
  wiring and validation; docs describe the option and the caveat that
  forcing Standard fails for values above the Standard tier size limit.
@officialasishkumar
officialasishkumar requested review from a team as code owners November 11, 2026 12:07

This branch has not been deployed

No deployments
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.

Add optional override for SSM Parameter Store tier selection for runner config writes (scale-up + pool)

1 participant