paginate-aws 1.0.4
Install from the command line:
Learn more about npm packages
$ npm install @baselime/paginate-aws@1.0.4
Install via package.json:
"@baselime/paginate-aws": "1.0.4"
About this version
Typesafe AWS Pagination using async generators
Useful when you need to paginate and AWS SDK call (v2/v3). Works with any aws operation with a paginationKey and uses typescript to help (but not guarantee) you have selected the correct pagination key
npm install @baselime/paginate-aws
import { paginate } from '@baselime/paginate-aws';
for await (const stacks of paginate((next) => cloudFormation.listStacks({ NextToken: next }).promise(), 'NextToken')) {
console.log(stacks.StackSummaries)
//=> [{ StackName: 'prod-just-ship-it-be-cool', ...}, ...]
}
returns an async generator that paginates through the aws-sdk list method returning all the responses.