use latest aws api, add support for secondary indexes