public override void Invoke(AWSCredentials creds, RegionEndpoint region, int maxItems) { AmazonSimpleWorkflowConfig config = new AmazonSimpleWorkflowConfig(); config.RegionEndpoint = region; ConfigureClient(config); AmazonSimpleWorkflowClient client = new AmazonSimpleWorkflowClient(creds, config); History resp = new History(); do { GetWorkflowExecutionHistoryRequest req = new GetWorkflowExecutionHistoryRequest { NextPageToken = resp.NextPageToken , MaximumPageSize = maxItems }; resp = client.GetWorkflowExecutionHistory(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.Events) { AddObject(obj); } } while (!string.IsNullOrEmpty(resp.NextPageToken)); }