Skip to content

Generates a systemd EnvironmentFile from AWS Systems Manager parameters.

Notifications You must be signed in to change notification settings

l1na-forever/ssmpuller

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ssmpuller

Generates a systemd EnvironmentFile from AWS Systems Manager parameters.

Installation

To install via Cargo:

cargo install ssmpuller

To install from source, first, install Rust, and then run:

git clone github.com/l1na-forever/ssmpuller
cd ssmpuller
cargo install --path .

Binary releases can be found on the Releases page.

Usage

To get help, run the command:

ssmpuller --help

To generate a systemd EnvironmentFile from secure parameters stored in SSM:

ssmpuller /etc/myservice/myservice.conf MY_API_KEY

This will generate a file that can be used to set environment variables via the EnvironmentFile= directive. An example file might look like:

MY_API_KEY='secret_token_goes_here'

To make use of the generated file as part of a systemd service unit, set the EnvironmentFile= directive:

[Unit]
Description=Example systemd service

[Service]
ExecStart=/usr/bin/myservice
EnvironmentFile=/etc/myservice/myservice.conf

ssmpuller's intended usage is to bootstrap an instance's long-lived, static credentials (e.g., 3rd-party API keys) at provision time, using the IAM instance role. Wherever possible, make use of a temporary/federated credentials and the instance role credentials to make service calls. Do not use ssmpuller to manage any AWS credentials; use IAM instance roles instead.

Status

ssmpuller is considered feature-complete, and is offered as-is. Bug reports and pull requests are most welcome!

Licence

Copyright © 2022 Lina

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Generates a systemd EnvironmentFile from AWS Systems Manager parameters.

Topics

Resources

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages