runway.lookups.handlers.ssm module

Retrieve a value from SSM Parameter Store.

If the Lookup is unable to find an SSM Parameter matching the provided query, the default value is returned or ParameterNotFound is raised if a default value is not provided.

Parameters of type SecureString are automatically decrypted.

Parameters of type StringList are returned as a list.

Arguments

This Lookup supports all Common Lookup Arguments.

Example

deployment:
  - modules:
      - path: sampleapp.cfn
        parameters:
          secret_value: ${ssm /example/secret}
          conf_file: ${ssm /example/config/json::load=json, get=value}
          toggle: ${ssm toggle::load=yaml, get=val, transform=bool}
    env_vars:
      SOME_VARIABLE: ${ssm /example/param::region=us-east-1}
      DEFAULT_VARIABLE: ${ssm /example/default::default=default}
class runway.lookups.handlers.ssm.SsmLookup[source]

Bases: runway.lookups.handlers.base.LookupHandler

SSM Parameter Store Lookup.

classmethod handle(value, context, **_)[source]

Retrieve a value from SSM Parameter Store.

Parameters
  • value – The value passed to the Lookup.

  • context – The current context object.

Raises

ParameterNotFound – Parameter not found in SSM and a default value was not provided.