I am trying to embed access and secret key along with aws cli. e.g.
aws ec2 describe-instances --aws-access-key --aws-secret-key
I had to access multiple accounts on Amazon....so my solution:
under: ~/.aws/config
[default] aws_access_key_id = xxxx aws_secret_access_key = xxxxxx region=sa-east-1 output=text
[profile prof1] region=us-east-1 output=text aws_access_key_id = yyy aws_secret_access_key = yyyyy
[profile prof2] region=us-east-1 output=text aws_access_key_id = wwwwww aws_secret_access_key = wwwww
..and then when evoke the aws CLI, i passed the parameter "--profile" as:
/usr/local/bin/aws ec2 describe-security-groups --group-ids sg-xxxx --profile prof2
...that it!