Git Product home page Git Product logo

aws-parameter-store's Introduction

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.

aws-parameter-store's People

Contributors

bwilson-agrian avatar eahefnawy avatar hypexr avatar laardee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

aws-parameter-store's Issues

Removing an aws-parameter-store results in timeout error and component not removed

Used the following serverless.yml and successfully deployed:

component: aws-parameter-store
name: parameters
org: garethmccumskey
app: test-parameters
stage: dev

inputs:

Once deployed running remove caused a timeout error:

test-parameters-store sls remove

serverless ⚡framework
Action: "remove" - Stage: "dev" - Org: "garethmccumskey" - App: "test-parameters" - Name: "parameters"

60s › Serverless › Request timed out after 60 seconds 

  Documentation: https://github.com/serverless/components 
  Support: https://app.serverless.com/support 
  Slack: https://www.serverless.com/slack/ 

The state of the deployed component is also in removing state:

image

AWS Parameter Store Component

Create a parameter store that allows synchronizing multiple SSM parameters and Secrets Manager secrets to AWS.

The declarative syntax is going to be something like this

myParameterStore:
  component: '@serverless/aws-parameter-store'
  inputs:
    parameters:
      - name: /my/parameter/name
        value: '000000'
        type: AWS/SSM/SecureString # something like this
      - name: parameter-name
        value: just-a-string
        type: AWS/SSM/String  # something like this
      - name: pg_password
        value: 'secret'
        type: AWS/SecretsManager  # something like this
        # + whatever parameters are needed, KMS id etc.

The component will output the ARN and version (SSM) for each of the parameters.

I'll refine the specification while implementing and open the PR later.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.