compwright/aws-env
最新稳定版本:v3.0.0
Composer 安装命令:
composer require compwright/aws-env
包简介
Load environment variables securely from AWS SSM
README 文档
README
Command-line script to obtain service configuration environment and secrets securely from AWS SSM.
Configuration
Configuration can be provided via command line options or environment variables:
| Option | Env. Variable | Description |
|---|---|---|
| -p, --path | AWS_ENV_PATH | Path of secrets to load from SSM |
| -f, --format | AWS_ENV_FORMAT | Output format, one of dotenv, env, or export |
This script can find AWS credentials in the usual ways, including:
- If running on EC2, by assuming an IAM role (recommended)
- By reading the
~/.aws/configand~/.aws/credentialsfiles, with the optionalAWS_PROFILEenvironment variable - Explicitly with the
AWS_REGION,AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYenvironment variables
Usage
Usage:
aws-env [options]
Options:
-p, --path=PATH Parameter key path [default: "/"]
-f, --format=FORMAT Output format: dotenv, env, export [default: "env"]
-h, --help Display help for the given command. When no command is given display help for the bin/aws-env command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
For example, to start a shell with a new environment consisting only of the items pulled from AWS SSM + $PATH:
env -i -S"$(bin/aws-env -p /my_app/development) PATH=$PATH" && /bin/bash
License
MIT License
统计信息
- 总下载量: 6.94k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-26