def _is_dynamodb_critical_exception(err):
    """Return true for botocore exceptions due to exceeded througput."""
    error_code = getattr(err, 'response', {}).get('Error', {}).get('Code')
    return error_code in {'ProvisionedThroughputExceededException',
        'UnrecognizedClientException'}
