Repository navigation
feat(runners): add runner_config_ssm_parameter_tier to override the SSM tier - #5589
Open
officialasishkumar wants to merge 1 commit into
Conversation
…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.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds an optional
runner_config_ssm_parameter_tierinput 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:
Advancedfor values of 4000 bytes or more (or whenssm_ttl_seconds.tokensis set),Standardotherwise. 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:putParametertakes an optionaltierthat takes precedence over the automatic selection.Standardcombined with a TTL is rejected, since expiration policies require the Advanced tier.storage-providers: newSSM_RUNNER_CONFIG_TIERenvironment variable, parsed likeSSM_TOKEN_TTL_SECONDS(empty = unset, invalid values fail fast) and passed to the runner config store.runner_config_ssm_parameter_tiervariable in the root andmodules/runners, wired to the scale-up Lambda and, via the pool config, to the pool Lambda. A precondition on the scale-up Lambda rejectsStandardtogether withssm_ttl_seconds.tokensat plan time.modules/multi-runner:runner_config.runner_config_ssm_parameter_tier(stable shape) andstorage_provider.aws.ssm.runner_config_tier(v2 shape), passed through to the runners module.docs/configuration.mddescribes the option, with an example and the caveat that forcingStandardfails for values above the Standard tier size limit (4 KB). Module READMEs updated.Test Plan
lambdas/libs/aws-ssm-utilandlambdas/libs/storage-providers: env parsing, store passing the tier,putParameterhonouring an explicit tier regardless of value size, and the Standard + TTL rejection (no SSM call made).aws-ssm-util(24) andstorage-providers(158) suites pass; eslint and prettier are clean.terraform testinmodules/runners(12 runs pass): default leavesSSM_RUNNER_CONFIG_TIERunset on both Lambdas, an explicit value reaches both the scale-up and pool Lambdas, an invalid value andStandard+ token TTL are rejected,Advanced+ token TTL is accepted.terraform testinmodules/multi-runner(21 runs pass), with assertions that the stable and v2 shapes carry the tier into the effective config.terraform fmt -check -recursiveandterraform validateon the root module.Related Issues
Fixes #5544