x-ssm_parameter

Syntax

Syntax reference
x-ssm_paramter:
  parameter-name:
    Properties: {}
    MacroParameters: {}
    Settings: {}
    Services: []

Tip

You can find the test files here to use as reference for your use-case.

Properties

Refer to AWS CFN SSM Parameter Documentation . We support all of the definition and test with the documentation examples.

Simple examples for x-ssm_parameter
---
# Blog applications

version: '3.8'

x-ssm_parameter:
  parameterA:
    Properties:
      DataType: text
      Description: Something
      Name: /some/parameter
      Type: String
      Value: ABCD

    Settings:
      EnvNames:
        - parameterA

  parameterB:
    Properties:
      DataType: text
      Description: Something
      Name: /some/other-parameter
      Type: String
      Value: ABCD
    Settings:
      EnvNames:
        - parameterb
    Services:
      - name: bignicefamily
        access: RW

  parameterC:
    Properties:
      Name: /some/yet-other-parameter
      Type: String
    MacroParameters:
      FromFile: ./use-cases/ssm/test_json.json
      ValidateJson: true
      MinimizeJson: true
    Services:
      - name: rproxy
        access: RO
      - name: youtoo
        access: SSMParameterReadPolicy
    Settings:
      EnvNames:
        - FIFO_parameter

  parameterD:
    Properties:
      Name: /some/yet-other-parameter
      Type: String
    MacroParameters:
      FromFile: ./use-cases/ssm/test_yaml.yaml
      ValidateYaml: true
    Services:
      - name: rproxy
        access: RO
      - name: youtoo
        access: SSMParameterReadPolicy
    Settings:
      EnvNames:
        - YAML_PARAM

  parameterS:
    Properties:
      Name: /some/yet-other-parameter
      Type: String
    MacroParameters:
      FromFile: ./use-cases/ssm/test_yaml.yaml
      ValidateYaml: true
      RenderToJson: true
    Services:
      - name: rproxy
        access: RO
      - name: youtoo
        access: SSMParameterReadPolicy
    Settings:
      EnvNames:
        - YAML_CONVERTED_PARAM

MacroParameters

MacroParameters:
    FromFile: path/to/file/from/command_exec
    ValidateJson: true|false
    MinimizeJson: true|false
    IgnoreInvalidJson: true|false
    ValidateYaml: true|false
    IgnoreInvalidYaml: true|false
    RenderToJson: true|false

FromFile

Path to file that you want to read the content of as the value for the SSM Parameter.

Warning

Do not use binary type content, only text should be used

ValidateJson

If the input is a file and you expect it to be a valid JSON, this will validate whether the value is correct. Fails the execution if is not

IgnoreInvalidJson

Allows to ignore the JSON validation errors

MinimizeJson

If your input is nicely indented etc, this allows to compact it into a minimize JSON

ValidateYaml

When using a file, allows to ensure that the structure and content is a valid YAML

IgnoreInvalidYaml

Allows to ignore the YAML validation errors

RenderToJson

This allows to render a content written in YAML for human friendly-ness, into a minimized JSON

Warning

This will require that the input is valid YAML and will ignore if not.

Settings

See the Settings for more details.

Hint

Given AWS SSM Parameter is serverless, there is no Subnets override.

Lookup

For more details, see the Lookup .

Lookup DynamoDB Table example
x-ssm_parameter:
  parameterA:
    Lookup:
      Tags:
        - owner: myself
        - costallocation: 123
    Services:
      - name: serviceA
        access: SSMParameterReadPolicy

ECS Compose-X defined access names:

  • RW : Allow read/write to the parameter including by path

  • RWStrict: Similarly to RW, without ByPath support

  • RO: Allow read only to the parameter including by path

  • ROStrict: Similarly to RO, without ByPath support

AWS SAM Predefined Policy:

Services

Define services
Services:
  - name: serviceA
    access: RW
  - name: serviceB
    access: RO