Writes AWS Secrets Manager secrets to files on disk.
9.1K
Writes AWS Secrets Manager secrets to files on disk. (If you need secrets as environment variables instead, you can use aws-secretsmanager-env)
Using go get:
go get -u github.com/sgreben/aws-secretsmanager-files
Or download the binary from the releases page.
# Linux
curl -L https://github.com/sgreben/aws-secretsmanager-files/releases/download/1.2.0/aws-secretsmanager-files_1.2.0_linux_x86_64.tar.gz | tar xz
# OS X
curl -L https://github.com/sgreben/aws-secretsmanager-files/releases/download/1.2.0/aws-secretsmanager-files_1.2.0_osx_x86_64.tar.gz | tar xz
# Windows
curl -LO https://github.com/sgreben/aws-secretsmanager-files/releases/download/1.2.0/aws-secretsmanager-files_1.2.0_windows_x86_64.zip
unzip aws-secretsmanager-files_1.2.0_windows_x86_64.zip
aws-secretsmanager-files [OPTIONS]
Usage of aws-secretsmanager-files:
-file-mode uint
file mode for secret files (default 256)
-profile string
override the current AWS_PROFILE setting
-secret FILE_PATH=SECRET_ARN
a key/value pair FILE_PATH=SECRET_ARN (may be specified repeatedly)
-secret-json-key FILE_PATH=SECRET_ARN#JSON_KEY
a key/value pair FILE_PATH=SECRET_ARN#JSON_KEY (may be specified repeatedly)
-secret-json-key-string FILE_PATH=SECRET_ARN#JSON_KEY
a key/value pair FILE_PATH=SECRET_ARN#JSON_KEY (may be specified repeatedly)
$ aws-secretsmanager-files -secret ./secret.json=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1
$ cat ./secret.json
{"hello":"world"}
$ aws-secretsmanager-files -secret-json-key ./secret.json=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1#hello
$ cat ./secret.json
"world"
$ aws-secretsmanager-files secret-json-key-string ./secret.json=arn:aws:secretsmanager:eu-west-1:28381901202:secret:example-secret-1#hello
$ cat ./secret.json
world
Content type
Image
Digest
Size
7.5 MB
Last updated
about 7 years ago
docker pull sgreben/aws-secretsmanager-files