Skip to content

NextToken in response is invalid and not similar to CLI equivalent #556

Answered by rcoh
tinkyholloway asked this question in Q&A
Discussion options

You must be logged in to vote

interesting—I don't think you need to transform the next token. Did you try using the paginator? https://docs.rs/aws-sdk-sfn/latest/aws_sdk_sfn/client/struct.Client.html#method.list_state_machines

use tokio_stream::StreamExt;
let items = client.list_step_functions().max_results(1).into_paginator().items().send().await;
let state_machines = items.collect::<Result<Vec<_>, _>>().await?

That said, I would be a little surprised if that worked? I don't think there is any transformation that occurs.

You can enable logging with the instructions here: https://docs.aws.amazon.com/sdk-for-rust/latest/dg/logging.html

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by tinkyholloway
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants