Protect what matters – even after you're gone. Make a plan for your digital legacy today.
Forum Discussion
Former Member
3 years agoStruggling with aws keys in the CLI using secret references in developer tools
Hello! I'm on a Mac, using the latest version of 1Password cli (2.1.0). I'm trying to use secret references to log onto the aws cli and I'm not sure what I'm doing wrong. I'm trying to sign into my "...
matthewf
3 years agoNew Contributor
Two suggestions:
First, it looks like the environment variables in your ~/.config/op/aws-env/CRC2/.env file are named access_key and secret_key - but aws CLI requires them to be named AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY. So your environment file should look something like this:
AWS_ACCESS_KEY_ID=op://{{vault}}/{{item}}/access_key_id
AWS_SECRET_ACCESS_KEY=op://{{vault}}/{{item}}/secret_access_key
Second, you probably don't need the --profile CRC2 switch. That switch instructs aws CLI to get the credentials for the CRC2 profile from your ~/.aws/credentials file - which isn't necessary now that op is supplying the credentials via environment variables.