def get_provisioned_gsi_read_units(table_name, gsi_name):
    """ Returns the number of provisioned read units for the table

    :type table_name: str
    :param table_name: Name of the DynamoDB table
    :type gsi_name: str
    :param gsi_name: Name of the GSI
    :returns: int -- Number of read units
    """
    try:
        desc = DYNAMODB_CONNECTION.describe_table(table_name)
    except JSONResponseError:
        raise

    for gsi in desc[u'Table'][u'GlobalSecondaryIndexes']:
        if gsi[u'IndexName'] == gsi_name:
            read_units = int(
                gsi[u'ProvisionedThroughput'][u'ReadCapacityUnits'])
            break

    logger.debug(
        '{0} - GSI: {1} - Currently provisioned read units: {2:d}'.format(
            table_name, gsi_name, read_units))
    return read_units
def get_provisioned_gsi_read_units ( table_name , gsi_name ) : try : desc = DYNAMODB_CONNECTION . describe_table ( table_name ) except JSONResponseError : raise for gsi in desc [ u'Table' ] [ u'GlobalSecondaryIndexes' ] : if gsi [ u'IndexName' ] == gsi_name : read_units = int ( gsi [ u'ProvisionedThroughput' ] [ u'ReadCapacityUnits' ] ) break logger . debug ( '{0} - GSI: {1} - Currently provisioned read units: {2:d}' . format ( table_name , gsi_name , read_units ) ) return read_units
Returns the number of provisioned read units for the table

    :type table_name: str
    :param table_name: Name of the DynamoDB table
    :type gsi_name: str
    :param gsi_name: Name of the GSI
    :returns: int -- Number of read units