On my ansible control server i was able to connect to target ec2 instance using AWS SSM connectivity. To achieve this my inventory had the instance-id followed by profile-details, aws_region
in the ansible control server under the path ~/.aws/ i have 2 files,
config and credentials
in config file, the profile has been mentioned along with the ARN of IAM role of the target AWS account where the EC2 instance resides. And a reference is made to the credentials.
In the credentials file, AWS access key ID, secret access key and session token is present.
In the playbook s3 bucket is mentioned.
After having all these, the connectivity works perfectly.
Now i need to have the connectivity achieved via AWX. What are the steps that needs to be followed. Let me know if more explanation is required.