Updraft ExtensionsPreview
AWS Systems ManagerManagement Stable

AWS::SSM::Parameter

Creates a Systems Manager Parameter Store parameter — a named, versioned, optionally encrypted configuration value that other services and stacks can read at runtime rather than at deploy time.

Required properties 2 of 9
Ref returns Parameter name/acme/payments/database-host
Fn::GetAtt 2 attributes
Replacement risk 1 1 property force replacement

Minimal template

Every required property, nothing else
Resources:
  DatabaseHost:
    Type: AWS::SSM::Parameter
    Properties:
      Name: /acme/payments/database-host
      Type: String
      Value: payments-db.internal.acme.example
Omitting Name is legal and lets CloudFormation generate one, but a generated parameter name is unreadable and cannot be referenced from outside the stack. Name your parameters.

Overview #

A Parameter Store parameter is the cheapest way to publish a value that other things read at runtime. It is not a secret store, not a configuration management system, and not a database — it is a named, versioned string with an IAM policy on it, and most of its value comes from being exactly that little.

The distinction that matters when writing templates is when the value is read. A stack parameter is resolved at deploy time and baked into the resources it configures. A Parameter Store parameter is resolved whenever the reader chooses to read it, which may be every request. Changing a stack parameter needs a deployment; changing a Parameter Store value does not.

Reading a parameter from a template #

Three mechanisms, with different resolution times and different failure modes.

# Resolved once, at deploy time. CloudFormation validates that the parameter
# exists before the stack starts, so a typo fails immediately and cleanly.
Parameters:
  DatabaseHost:
    Type: AWS::SSM::Parameter::Value<String>
    Default: /acme/payments/database-host

Resources:
  Service:
    Type: AWS::ECS::TaskDefinition
    Properties:
      ContainerDefinitions:
        - Name: api
          Environment:
            - Name: DB_HOST
              Value: !Ref DatabaseHost   # the value, not the parameter name

Hierarchies #

Parameter names are paths, and the path is the access-control boundary.

/acme/payments/production/database-host → ssm:GetParametersByPath on /acme/payments/productionone policy statement covers the whole environment

A convention that works: /{org}/{system}/{environment}/{key}. It makes GetParametersByPath return exactly one environment’s configuration, and it makes an IAM policy per environment a single resource ARN with a wildcard suffix.

Properties

Expand a row for the full reference; nested types open in place

9 top-level properties

  • Type StringThe parameter's value type, which fixes how the value is stored and returned. Required No interruption — updates in place
    String stores a single value. StringList stores a comma-separated list that Systems Manager splits on read. SecureString stores a value encrypted with a KMS key.
    Type
    String
    Required
    Yes
    Update behaviour
    No interruption

    Allowed values

    • String
    • StringList
    • SecureString

    Example values

    • String
  • Value StringThe parameter value. Changing it creates a new version rather than mutating the old one. Required No interruption — updates in place
    For StringList, supply a comma-separated string — readers receive it split into a list. Commas cannot be escaped, so a list member containing a comma is not representable.
    Type
    String
    Required
    Yes
    Update behaviour
    No interruption
    Length
    1 – 4096

    Example values

    • payments-db.internal.acme.example
  • AllowedPattern StringRegular expression that Systems Manager enforces against the value on write. No interruption — updates in place
    Validation happens in Systems Manager, not in CloudFormation. A value that fails the pattern surfaces as a ParameterPatternMismatchException in the stack event rather than as a template validation error.
    Type
    String
    Required
    No
    Update behaviour
    No interruption
    Length
    0 – 1024

    Example values

    • ^\d+$
  • DataType StringTells Systems Manager to validate the value as a particular kind of identifier. No interruption — updates in place
    aws:ec2:image makes Systems Manager check that the value is a real, accessible AMI ID before accepting the write, and re-check it periodically. It is the difference between finding out about a deregistered AMI at parameter-write time and finding out during an Auto Scaling event.
    Type
    String
    Required
    No
    Update behaviour
    No interruption
    Default
    text

    Allowed values

    • text
    • aws:ec2:image
    • aws:ssm:integration
  • Description StringFree-text description shown in the console and returned by DescribeParameters. No interruption — updates in place

    Free-text description shown in the console and returned by DescribeParameters.

    Type
    String
    Required
    No
    Update behaviour
    No interruption
    Length
    0 – 1024
  • Name StringThe fully qualified parameter name, including its hierarchy path. Replacement — CloudFormation creates a new resource and deletes the old one Create-only
    Leading / puts the parameter in a hierarchy, which is what makes GetParametersByPath and path-scoped IAM policies work. A name without a leading slash is a flat top-level parameter and cannot be retrieved by path.
    Type
    String
    Required
    No
    Update behaviour
    Replacement
    Pattern
    ^[a-zA-Z0-9_.\-/]+$ Letters, digits, underscore, period, hyphen and forward slash.
    Length
    1 – 2048

    Example values

    • /acme/payments/database-host
  • Policies StringA JSON array of parameter policies — expiration, expiration notification, and no-change notification. No interruption — updates in place
    Supplied as a JSON string, not as a template object, so it must be escaped or written with a block scalar in YAML. Requires the Advanced tier; supplying policies on a Standard parameter fails the stack.
    Type
    String
    Required
    No
    Update behaviour
    No interruption

    Example values

    • [{"Type":"Expiration","Version":"1.0","Attributes":{"Timestamp":"2027-01-01T00:00:00.000Z"}}]
  • Tags JSONKey/value tags, supplied as a JSON object rather than the usual list of Key/Value pairs. No interruption — updates in place
    This is one of the few resource types whose Tags property is a plain object ({"Team": "payments"}) rather than a list of {"Key": …, "Value": …} objects. Copying a Tags block from another resource type into this one will not validate.
    Type
    JSON
    Required
    No
    Update behaviour
    No interruption

    Example values

    • {"Team": "payments", "Environment": "production"}
  • Tier StringStorage tier, which sets the size limit, policy support, and whether the parameter is billed. No interruption — updates in place
    Standard is free, caps the value at 4 KB, and supports no policies. Advanced raises the cap to 8 KB, enables parameter policies, and is billed per parameter per month. Intelligent-Tiering starts a parameter as Standard and promotes it to Advanced automatically the first time it exceeds a Standard limit.
    Type
    String
    Required
    No
    Update behaviour
    No interruption
    Default
    Standard

    Allowed values

    • Standard
    • Advanced
    • Intelligent-Tiering
updates in place some interruption replacement create-only read-only write-only

Return values

What other resources can read from this one
Ref
Returns the parameter’s name — the value of Name, or the generated name if Name was omitted.

!Ref MyResource → /acme/payments/database-host

Fn::GetAtt attributes

AttributeTypeDescriptionExample value
TypeStringThe parameter’s type, echoed back.String
ValueStringThe parameter’s value, echoed back. Readable in the template, so treat it as public.payments-db.internal.acme.example

Required permissions

For the principal running the stack operation

create

  • ssm:PutParameter
  • ssm:AddTagsToResource
  • ssm:GetParameters

read

  • ssm:GetParameters
  • ssm:ListTagsForResource

update

  • ssm:PutParameter
  • ssm:AddTagsToResource
  • ssm:RemoveTagsFromResource

delete

  • ssm:DeleteParameter

list

  • ssm:DescribeParameters
{
  "Statement": [
    {
      "Action": [
        "ssm:AddTagsToResource",
        "ssm:DeleteParameter",
        "ssm:DescribeParameters",
        "ssm:GetParameters",
        "ssm:ListTagsForResource",
        "ssm:PutParameter",
        "ssm:RemoveTagsFromResource"
      ],
      "Effect": "Allow",
      "Resource": "*",
      "Sid": "ManageResource"
    }
  ],
  "Version": "2012-10-17"
}