Open in playground
export const main = asl.deploy.asStateMachine(async (input: any) => {
var marker: string | undefined;
do {
var response = await asl.sdk(IAM).listUsers({
name: "List Users",
parameters: {
PathPrefix: "/path",
Marker: marker,
},
});
for (const user of response.Users || []) {
//put your logic here
await doSomething(user);
}
marker = response.IsTruncated ? response.Marker : undefined;
} while (marker);
});
export const doSomething = asl.deploy.asStateMachine(async (input: User) => {
console.log(input);
});