Create DNS record from remote machine

I am very new to Ansible so perhaps some concepts are still not clear to me.

I have a set of roles and playbooks working correctly to create ec2 instances, provision them and deploy.
I am looking for create DNS records for those instances, the “usual” approach seems to be create those immediately after create an ec2 instance and that works.
I would like to create a DNS record from the remote machine, that means in a playbook that matches other hosts than localhost, the problem is that I am not seeing a way to tell ansible to forward the same aws keys I being using and instead I am being able to force to add keys for route53 module. I know ENV vars will make it work, but since we are using profiles, I would like to keep it simple just by assigning a profile (boto) and run.

Thanks!

You should probably associate the ec2 instance with an iam role that allows you to create route53 records if you want to carry this out from the ec2 instance.

You’ve not able to add the instance to a temporary inventory (add_host) and then carry out the route53 task from the local host?