boto / boto

For the latest version of boto, see https://github.com/boto/boto3 -- Python interface to Amazon Web Services

Home Page:http://docs.pythonboto.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

_introspect_all_indexes can break during GSI deletion

jseakle opened this issue · comments

This block expects the 'Projection' field to exist in each index, but when the index has the "DELETING" status (or similar, I can no longer quickly find the actual status string), this field is not present, causing a KeyError. We luckily discovered this in testing, but were at significant risk of having it impact a production system.

We've worked around it by monkey-patching the function to add

    try:
        field['Projection']
        field['Projection']['ProjectionType']
    except KeyError:
        continue

but this is of course brittle and undesirable.