Retrieves an AWS secret value as-is after given its secret name. The script can read an AWS Profile name as well as a credentials file in the CLI, otherwise it will automatically load its settings following AWS SDK standards
> aws-get-secret-value
Help:
-aws-region string
AWS Region where to send requests to (default "default")
-credentials-file string
Full path to credentials file (default "/root/.aws/credentials")
-profile string
AWS Profile to use (default "default")
-secret-name string
Secret To Fetch (default "secret")
-secret-version string
Version of secret To Fetch (default "version")
Using go get:
go get -u github.com/kitos9112/aws-get-secret-value
Or download the binary from the releases page.
# Linux
curl -L https://github.com/kitos9112/aws-get-secret-value/releases/download/0.1.0/aws-get-secret-value_0.1.0_linux_x86_64.tar.gz | tar xz
# OS X
curl -L https://github.com/kitos9112/aws-get-secret-value/releases/download/0.1.0/aws-get-secret-value_0.1.0_osx_x86_64.tar.gz | tar xz
# Windows
curl -LO https://github.com/kitos9112/aws-get-secret-value/releases/download/0.1.0/aws-get-secret-value_0.1.0_windows_x86_64.zip
unzip aws-get-secret-value_0.1.0_windows_x86_64.zip
aws-get-secret-value [OPTIONS] [COMMAND [ARGS...]]
Usage of aws-get-secret-value:
-aws-region string
AWS Region where to send requests to (default "default")
-credentials-file string
Full path to credentials file (default "/home/msoutullo/.aws/credentials")
-profile string
AWS Profile to use (default "default")
-secret-name string
Secret To Fetch (default "secret")
-secret-version string
Version of secret To Fetch (default "version")
The simplest example that could easily be integrated into a CICD pipeline:
> export AWS_PROFILE=myAwsProfile
> export AWS_REGION=eu-west-1
> aws-get-secret-value --secret-name my_secret_name
mySecretValue
Content type
Image
Digest
Size
7.6 MB
Last updated
over 5 years ago
docker pull kitos9112/aws_get_secret_value