public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonIoTConfig config = new AmazonIoTConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonIoTClient client = new AmazonIoTClient(creds, config); ListOTAUpdatesResponse resp = new ListOTAUpdatesResponse(); do { ListOTAUpdatesRequest req = new ListOTAUpdatesRequest { NextToken = resp.NextToken , MaxResults = maxItems }; resp = client.ListOTAUpdates(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.OtaUpdates) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextToken)); }