/envs

Primary LanguageShell

Using 1password to store environment variables

Inject secrets in a command

Comando op inject

echo "serverless config credentials --provider AWS --key {{ op://personal/aws/lambda/AWS_ACCESS_KEY_ID }} --secret {{ op://personal/aws/lambda/AWS_SECRET_ACCESS_KEY }}" | op inject

output:

serverless config credentials --provider AWS --key 123KEY123 --secret 123SECRET123

Alias

Securely authenticate any CLI with 1Password

AWS

alias aws-auth="op run --env-file=$HOME/git/envs/aws.env --"
alias aws="op run --env-file=$HOME/git/envs/aws.env -- aws"