Use ansible/AWX authentication to awscli with an attached iam-role on instance

,

Hello @ll,

we use ansible / AWX in AWS.
For security we have IAM-Roles attached to the AWX instance.

Now I want to get the data of the instances from multiple AWS-accounts with ansible template to create Snapshots for backup of a part of instances.

We have in ~/.aws/config many profiles like this:

`
[profile xxx]
region = eu-central-1
role_arn = xxx
credential_source = Ec2InstanceMetadata
output = text

`

If we use the awscli command line, the connection to the AWS-accounts is available and the result is right.

If i use the playbook, we don’t get Errors but always no result, because there is no connection.

Playbook:

`

Has nobody an Idea?

Hi,

Do you have your ~/.aws/config file inside the web and task container?
Notice the awx user home is /var/lib/awx