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

Logging an AccessDeniedException in dynamodb.update_table_provisioning causing a KeyError #247

Closed
craiga opened this Issue Jun 1, 2015 · 1 comment

Comments

Projects
None yet
2 participants
@craiga

craiga commented Jun 1, 2015

When I don't have permission to dynamodb:UpdateTable on my_table, I get a KeyError instead of a message telling me about an AccessDeniedException.

$ dynamic-dynamodb --config my-config.ini 
2015-06-01 01:13:40,628 - dynamic-dynamodb - INFO - my_table - Consumed read units: 150%
2015-06-01 01:13:40,673 - dynamic-dynamodb - INFO - my_table - Consumed write units: 0%
2015-06-01 01:13:40,723 - dynamic-dynamodb - INFO - my_table - Consumed read units: 150%
2015-06-01 01:13:40,742 - dynamic-dynamodb - INFO - my_table - Read throttle count: 402
2015-06-01 01:13:40,743 - dynamic-dynamodb - INFO - my_table - Resetting the number of consecutive read checks. Reason: scale up event detected
2015-06-01 01:13:40,743 - dynamic-dynamodb - INFO - my_table - Consecutive read checks 0/1
2015-06-01 01:13:40,787 - dynamic-dynamodb - INFO - my_table - Consumed write units: 0%
2015-06-01 01:13:40,816 - dynamic-dynamodb - INFO - my_table - Write throttle count: 0
2015-06-01 01:13:40,816 - dynamic-dynamodb - INFO - my_table - Scaling down writes is not done when usage is at 0%
2015-06-01 01:13:40,816 - dynamic-dynamodb - INFO - my_table - Consecutive write checks 0/1
2015-06-01 01:13:40,816 - dynamic-dynamodb - INFO - my_table - Changing provisioning to 25 read units and 1 write units
2015-06-01 01:13:40,877 - dynamic-dynamodb - INFO - my_table - Updating provisioning to 25 reads and 1 writes
2015-06-01 01:13:40,882 - dynamic-dynamodb - ERROR - 'message'
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/dynamic_dynamodb/__init__.py", line 98, in main
    execute()
  File "/usr/local/lib/python2.7/site-packages/dynamic_dynamodb/__init__.py", line 131, in execute
    table_num_consec_write_checks)
  File "/usr/local/lib/python2.7/site-packages/dynamic_dynamodb/core/table.py", line 68, in ensure_provisioning
    updated_write_units)
  File "/usr/local/lib/python2.7/site-packages/dynamic_dynamodb/core/table.py", line 576, in __update_throughput
    int(write_units))
  File "/usr/local/lib/python2.7/site-packages/dynamic_dynamodb/aws/dynamodb.py", line 385, in update_table_provisioning
    ).format(table_name, exception, error.body['message']))
KeyError: 'message'

@sebdah sebdah added this to the 1.20.x milestone Jun 2, 2015

@sebdah sebdah self-assigned this Jun 2, 2015

sebdah added a commit that referenced this issue Jun 2, 2015

@sebdah

This comment has been minimized.

Owner

sebdah commented Jun 2, 2015

This should be fixed now in version 1.20.6. Thanks for the bug report!

@sebdah sebdah closed this Jun 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment