Skip to content

farbodsalimi/go-ssm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-ssm

A single binary for fetching AWS SSM parameters. This library is a helper package for fetching secrets and injecting them in the environment at runtime.

Build

make build

Usage

First, make sure your AWS region is already set:

export AWS_REGION=us-west-2

Then export the list of parameters that you need:

export SSM_KEYS=/PATH/KEY_1,/PATH/KEY_2,/PATH/KEY_3

Now you can fetch the parameters and pass them to the next command:

./bin/go_ssm node main.js

(In this example, all the parameters will be available for the node.js app in process.env)

AWS ECS TaskDefinition CloudFormation

taskdefinition:
  Type: AWS::ECS::TaskDefinition
  Properties:
    ContainerDefinitions:
      - Name:
          Ref: "AppName"
        Environment:
            - Name: SSM_KEYS
              Value: /PATH/KEY_1,/PATH/KEY_2,/PATH/KEY_3
        Command:
          - go-ssm pm2 app.js
  ...

About

A single binary for fetching AWS SSM parameters

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published