Skip to content
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

Handle AccessDenied exception in SES check #375 #376

Merged
merged 6 commits into from
Jan 27, 2019

Conversation

bergkampsliew
Copy link
Contributor

Summary

Handle AccessDenied exception in SES check for non-supported region
More info on the issue : #375

Contributor License Agreement

By submitting this work for inclusion in awslimitchecker, I agree to the following terms:

  • The contribution included in this request (and any subsequent revisions or versions of it)
    is being made under the same license as the awslimitchecker project (the Affero GPL v3,
    or any subsequent version of that license if adopted by awslimitchecker).
  • My contribution may perpetually be included in and distributed with awslimitchecker; submitting
    this pull request grants a perpetual, global, unlimited license for it to be used and distributed
    under the terms of awslimitchecker's license.
  • I have the legal power and rights to agree to these terms.

@codecov-io
Copy link

codecov-io commented Jan 23, 2019

Codecov Report

Merging #376 into develop will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           develop   #376   +/-   ##
======================================
  Coverage      100%   100%           
======================================
  Files           30     30           
  Lines         2245   2256   +11     
  Branches       331    335    +4     
======================================
+ Hits          2245   2256   +11
Impacted Files Coverage Δ
awslimitchecker/services/ses.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 364d88f...ed4dfaf. Read the comment docs.

@jantman
Copy link
Owner

jantman commented Jan 23, 2019

@bergkampsliew I commented on #375 ...

Thank you for the contribution. In order to write tests for this I need a copy of the exact traceback that's being thrown along with the error message, or a region that I can try and reproduce the problem in.

@bergkampsliew
Copy link
Contributor Author

the stacktrace as below, and it's reproducible against region eu-central-1 (you can compare the result from ap-northeast-1 as both regions do not support SES yet)

Traceback (most recent call last):
File "/usr/local/bin/awslimitchecker", line 11, in
sys.exit(console_entry_point())
File "/usr/local/lib/python2.7/dist-packages/awslimitchecker/runner.py", line 415, in console_entry_point
r.console_entry_point()
File "/usr/local/lib/python2.7/dist-packages/awslimitchecker/runner.py", line 409, in console_entry_point
res = self.check_thresholds()
File "/usr/local/lib/python2.7/dist-packages/awslimitchecker/runner.py", line 310, in check_thresholds
service=self.service_name)
File "/usr/local/lib/python2.7/dist-packages/awslimitchecker/checker.py", line 553, in check_thresholds
cls._update_limits_from_api()
File "/usr/local/lib/python2.7/dist-packages/awslimitchecker/services/ses.py", line 105, in _update_limits_from_api
resp = self.conn.get_send_quota()
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 357, in _api_call
return self._make_api_call(operation_name, kwargs)
File "/usr/local/lib/python2.7/dist-packages/botocore/client.py", line 661, in _make_api_call
raise error_class(parsed_response, operation_name)
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetSendQuota operation: Unknown

@jantman
Copy link
Owner

jantman commented Jan 24, 2019

Ok, thanks! I'm actually going to be really busy the next few days, but I'll try to get this merged this weekend.

@jantman jantman merged commit 23d4485 into jantman:develop Jan 27, 2019
@jantman
Copy link
Owner

jantman commented Jan 27, 2019

This has been released in 6.0.1 which is now live on PyPI. Thank you so much @bergkampsliew !!

nadlerjessie pushed a commit to nadlerjessie/awslimitchecker that referenced this pull request Feb 16, 2019
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

Successfully merging this pull request may close these issues.

3 participants