Skip to content

serverless-components/aws-parameter-store

Repository files navigation

Serverless Components


AWS Parameter Store ⎯⎯⎯ Easily access your AWS parameter store values in components, powered by Serverless Components.


  1. Configure
  2. Deploy
  3. Use

 

1. Configure

The aws-parameter-store component allows you to specify the String/SecureString parameters your components need access to. The parameters are made available as outputs from the component and can be referenced by name.

Here's a complete reference of the serverless.yml file:

component: aws-parameter-store   # (required) name of the component.
name: myParameters               # (required) name of your component instance.
org: myOrg                       # (optional) serverless dashboard org. default is the first org you created during signup.
app: myApp                       # (optional) serverless dashboard app. default is the same as the name property.
stage: dev                       # (optional) serverless dashboard stage. default is dev.

inputs:
  parameters:
    - name: parameterFoo         # name of the output key -- parameter name
      path: /path/parameter      # fully qualified path to the parameter in parameter store -- parameter value
    - name: parameterBar
      path: /path/parameter
  region: us-east-2              # (optional) aws region to deploy to. default is us-east-1.

2. Deploy

Run serverless deploy to deploy (or simply just serverless). This will read the parameter store values and make them available to other components as output variables.

3. Use

Output parameters are structured like:

{
  [parameter name]: [parameter value]
}

Example:

{
  "parameterFoo": "some value",
  "parameterBar": "another value"
}

Parameter store variables are accessed in other components using the variable output: syntax: ${output:[stage]:[org]:[parameter store component name].[parameter name]}.

Example:

component: example-component
name: exampleName
org: myOrg
app: myApp
stage: dev

inputs:
  someInput: ${output:dev:myOrg:myParameters.parameterBar}

New to Components?

Checkout the Serverless Components repo for more information.

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •