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); ListRoleAliasesResponse resp = new ListRoleAliasesResponse(); do { ListRoleAliasesRequest req = new ListRoleAliasesRequest { Marker = resp.NextMarker , PageSize = maxItems }; resp = client.ListRoleAliases(req); CheckError(resp.HttpStatusCode, "200"); foreach (var obj in resp.RoleAliases) { AddObject(obj); } }while (!string.IsNullOrEmpty(resp.NextMarker)); }