-
Notifications
You must be signed in to change notification settings - Fork 397
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Route53 boto error "Profile not found" when using IAM Role with AWS config #35
Comments
Any feedback here? We initially tried to work around this, but have removed the module and replaced it with aws cli calls for the time being. |
Same issue here. Would be nice to have it solved. Also switched back to aws cli to create RessourceRecords. |
Any fix for this. I am able to use profile and able to run the command. But the same playbook is not working in Ansible Tower. I used AWS creds and profile in Tower it is not working. Tower dynamic inventory is working using iam role arn |
CC @bpennypacker and @jimbydamonk (the listed authors of this module) I apologise for the delayed response. This module is specifically an older boto v2 based module rather than a boto v3 based module. This means that the configuration of the module isn't taken from the 'usual' places and doesn't have some of the features you might want (including automatically assuming an IAM Role). See also: http://boto.cloudhackers.com/en/latest/boto_config_tut.html The long term fix would be to migrate this module to boto3 and patches would be welcome, we already have some automated testing in place which would help when it comes to reviewing the change. As a work around you could use the 'source' profile to assume the role with the sts_assume_role module, and then pass the generated credentials in as parameters. |
This will be covered by pull request #405. |
#405 was merged. This issue should be fixed in the latest versions of the module. |
To copy from the comment on #405 for anyone else who might find this.
One key piece is that "profile" is passed directly to the boto3 library, if you don't use "local", then you'll need to make sure that the profile is available wherever the module is actually being executed (note: this will be the Ansible target not the controller.) @eRadical also said:
|
* draft readme * Apply suggestions from code review Co-Authored-By: Jill R <[email protected]> Co-authored-by: Jill R <[email protected]>
Migrated from ansible/ansible#68711
SUMMARY
When using
route53
module using Assumed Role based authentication, module will fail with an error like:May be related to ansible/ansible#41185, but this is a Bug not a Feature Request as this method of authentication with Boto is available and works fine with other modules.
ISSUE TYPE
COMPONENT NAME
route53
moduleANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
Using AWS config defining a profile
route53-role-profile
assuming a Role such as:With task such as:
Will cause mentionned error.
Same result when using
AWS_PROFILE
environment variable instead ofprofile:
But using the profile on which access keys are configured directly will work:
Using AWS CLI to perform similar actions with such config works fine.
EXPECTED RESULTS
route53
module to useboto
and properly assume configured role to execute task.ACTUAL RESULTS
Module fail with error:
The text was updated successfully, but these errors were encountered: