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 your .config/op/aws-env/CRC2/.env file defines the environment variables access_key and secret_key. But the aws CLI requires them to be named AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.
So your .env file should probably look like this:
AWS_ACCESS_KEY_ID=op://{{vault}}/{{item}}/access_key_id
AWS_SECRET_ACCESS_KEY=op://{{vault}}/{{item}}/secret_access_key
Second: if you're using op to inject credentials via environment variables, then you shouldn't need the --profile CRC2 switch. (That switch tells aws CLI to fetch credentials for the CRC2 profile from your ~/.aws/credentials file)