Skip to content

Input SQS queue name not added to the URI properly when using AssumeRole #250

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

Closed
jordo1138 opened this issue Nov 6, 2018 · 2 comments
Closed

Comments

@jordo1138
Copy link
Contributor

jordo1138 commented Nov 6, 2018

After locally fixing the input set region issue #249 , I found a interesting bug where when assuming the role, I am able to assume the role, successfully send listbucket request and then when it creates the sqs client and url to use, I get a 400 bad request because the queue name cannot be found for this wsdl.
But after inspecting using fluentd -vv it's clear the issue is that although my fluent.conf sets the SQS queue_name correctly, the SQS client POST request is to / instead of the /accountnumber/queue_name
The region for sqs HOST is also correct. See Image below. The log even shows the right queue name but for somereason didn't form the URL correctly. I have also properly granted my assumedRole access to the SQS queue in us-west-2 but no way to know if it's working since the POST request is incorrect.
screen shot 2018-11-06 at 11 51 45 am

The issue does not exist when using a key/secret key to another queue in the same region and the sqs client POST url is correctly formed, seems to be limited to assumeRole scenario
I believe the issue is due to the sqs queue not being in the same account as the assumed role. Is this a requirement? I have granted access to the assumed role to that sqs queue but seems it's a related issue.

@jordo1138
Copy link
Contributor Author

modified to handle cross account id that owns the sqs queue when getting the Queue url per https://docs.aws.amazon.com/sdkforruby/api/Aws/SQS/Client.html#get_queue_url-instance_method
it's in the pull request now #249

@repeatedly
Copy link
Member

Merged PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants