-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
Improve AWS SQS Sensor #16880
Comments
Doesn't Boto do that for us already? |
Yea I have a gripe about the usability/accuracy of the AWS documentation sometimes. Some of the boto3 APIs do indeed provide a managed capability so we don't need to check return codes. For the SQS receive_message API in particular - The boto3 response does not document explicitly that it returns ResponseMetadata, but in practice it definitely does return it :) At the top of the boto3 SQS page, client section, additional information section, they do link to this: So you kind of have to stumble upon it... but that is the clearest reference I could find. There is also this guide: This developer guide link also doesn't clarify, in fact it doesn't mention the response metadata at all: In my SQS responses I do see the ResponseMetadata element that can be (and presumably should be) checked. So the check I would like to add is the usual:
|
Edit: The "clearest reference" link doesn't even mention checking the HTTP code which is definitely in the responses I have.... So yea not clear at all then ;) |
Botocore handles it -- we don't have to. |
That is awesome, thank you for sharing. I'll scratch that one from this request :) |
Description
Improve the AWS SQS Sensor as follows:
[Not needed, see below conversation]
--- Check the HTTP status code in AWS response and raise Exception if not 200 - best practice
Use case / motivation
I'd like to make the SQS sensor more flexible to enable the following use case:
Are you willing to submit a PR?
Yes, please assign to me
Related Issues
None
The text was updated successfully, but these errors were encountered: