AWS IAM Roles – Using with Ansible

amazon ec2amazon-iamamazon-web-servicesansible

Apparently the AWS Access Key and Secret Key are optional parameters for the AWS Cloud Modules, however the places where the ansible would pick up those values are from Environment variables.

Can we completely remove the Access Keys business by using the EC2 instance with IAM Role for Ansible to communicate with AWS.

Best Answer

Yes. I've removed my access/secret keys across Ansible and use IAM roles. Note you'll need some role permissions on the "server" and others on the destination boxes.