Signing back into the Community for the first time? You'll need to reset your password to access your account. Find out more.
Forum Discussion
Former Member
3 years agoHow-to configure AWS config credential_process + op?
In CLIv1 I was able to use something like:
[profile default]
region=us-west-2
credential_process = sh -c "op --account kramer get item 'AWS Production' | jq '.details.sections[2].fields | ...
Former Member
3 years agoI had to make changes to your version to match what credential_process
expects.
credential_process = sh -c 'echo "{\n \"Version\": 1,\n \"AccessKeyId\": \"$(op read op://MyVault/aws-staging/CREDENTIALS/aws_access_key_id)\",\n \"SecretAccessKey\": \"$(op read op://MyVault/aws-staging/CREDENTIALS/aws_secret_access_key)\"\n}" '
The AWS CLI expects a multi-line JSON return, so I added \n
where needed and needed to be exec'd with -c
passed to the shell.
This works quite well now!