Tool to execute things with ENV vars set from AWS Parameter Store variables
10K+
Fetches parameters recursively at PARAMETER_PATHs from AWS SSM Parameter Store.
Then executes CMD with the parameters transformed into ENV variables.
The parameter names will be transformed as:
Conflicting parameters will resolve to the value of the last one found. Any existing ENV variables (unless --clean-env is specified) will be passed along and takes precedence over parameters with the same name - to allow overriding specific parameters (e.g in development environment).
Given the following parameters:
| name | value |
| /one/test | 1 |
| /two/test | 2 |
When requesting: [/, /one, /two]
Then the following ENV variables will be available:
| name | value |
| ONE_TEST | 1 |
| TWO_TEST | 2 |
| TEST | 2 |
shards build./bin/pse to a location in your $PATHDownload the desired version from the releases page.
When started, the tool will try to detect your current AWS credentials in the following order:
~/.aws/credentialspse /path/to/parameters -- env
Use the --help option for further information on how to invoke the tool.
FROM alpine
# install a specific binary release
ARG pse_version=latest
ADD https://github.com/neochrome/parameter-store-executor/releases/download/${pse_version}/pse /
# -- or --
# use the latest released version
ADD https://github.com/neochrome/parameter-store-executor/releases/latest/download/pse /
The binary release is additionally pushed to Docker Hub and may be installed using a multi-stage docker build like so:
# install a specific binary release
FROM neochrome/parameter-store-executor:0.2.0 as release
# -- or --
# use the latest version
FROM neochrome/parameter-store-executor:latest as release
COPY --from=release /pse /
The tool may be specified as the ENTRYPOINT of a docker image to allow for
easy use of AWS SSM Parameter Store parameters with your application:
FROM alpine
# install the binary release using one of the methods above
# make the binary executable
RUN chmod +x /pse
# specify AWS_REGION unless passed from outside your container
ENV AWS_REGION=eu-west-1
# use an ENV var to specify the parameter(s) to use
ENV PARAMETER_PATH=/some/path
ENTRYPOINT /pse "$PARAMETER_PATH" -- env
# -- or --
# specify the parameter(s) directly in the ENTRYPOINT
# and optionally use CMD
ENTRYPOINT [ "/pse", "/some/path", "--" ]
CMD ["env"]
git checkout -b my-new-feature)git commit -am 'Add some feature')git push origin my-new-feature)To cut a new release, push a tag with the new (semver) version, e.g: v1.2.3.
The tag should refer to a commit that has the shard.yml version and ./src/version.cr
updated with the new version. The script ./scripts/version synchronizes this
and also perform some checks:
Content type
Image
Digest
sha256:42c2159b2…
Size
5.4 MB
Last updated
over 1 year ago
docker pull neochrome/parameter-store-executor