SB.
SB.

Reputation: 23

Is it possible to use an IAM Role on an EC2 Instance that uses Ansible Playbooks to affect other instances?

I'd like to avoid my AWS instance using Access keys to perform actions via ansible on other AWS Instances. Is there any way to get it to work with a role? It seems like the ansible modules require access keys, but I was uncertain if there is another way.

https://docs.ansible.com/ansible/latest/collections/community/aws/ec2_instance_info_module.html

Upvotes: 0

Views: 927

Answers (1)

SB.
SB.

Reputation: 23

Thanks to Mark, I found that this module uses the instance's profile. I fixed the error by deleting my aws credentials file located in ~/.aws/credentials.

Upvotes: 2

Related Questions