elhaz export¶
Synopsis¶
elhaz export [OPTIONS]
Description¶
Export temporary AWS credentials for the named config. If no active session exists for the config, elhaz adds it to the daemon automatically before exporting.
Three output formats are available:
json(default)Prints the raw credentials dict with
access_key,secret_key,token, andexpiry_timefields.envPrints
export KEY=VALUElines suitable foreval. SetsAWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY,AWS_SESSION_TOKEN, andAWS_CREDENTIAL_EXPIRATION.credential-processPrints a JSON object matching the shape required by AWS
credential_processprofile entries.
Options¶
--name,-nNAMEConfig name. If omitted, an interactive selection prompt is shown.
--format,-fjson|env|credential-processOutput format. Default:
json.--obscure,-oRedact sensitive credential values in the output. The
access_key,secret_key, andtokenfields are replaced with***. Theexpiry_timefield is not affected. Applies to all output formats. Off by default.--helpShow help message and exit.
Examples¶
Export as JSON:
elhaz export -n prod
Source env vars into the current shell:
eval $(elhaz export -n prod -f env)
Use elhaz as an AWS credential_process provider in ~/.aws/config:
[profile my-role]
credential_process = elhaz export -n prod -f credential-process
Export credentials with sensitive values hidden (e.g. for screen sharing):
elhaz export -n prod --obscure