prerequisites

  • aws cli
  • 1password v8 with cli enabled

optional

  • direnv for folder specific config (export env var)
export AWS_ACCESS_KEY_ID=op://your-vault-name/AWS_CLI/username
export AWS_SECRET_ACCESS_KEY=op://your-vault-name/AWS_CLI/credential


alias aws="op run -- /usr/local/bin/aws"
alias cdk="op run -- /usr/local/bin/cdk"
alias sam="op run -- /usr/local/bin/sam"
alias ts-node="op run -- node -r ts-node/register"

Done you can now run aws commands

aws s3 ls