This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
AWS SDK for Node.js provides the s3.listObjects API which | |
lists the objects from a bucket. However, if you have a lot | |
of objects in your bucket then the response of this API is | |
truncated. So, the entire contents of a bucket cannot be | |
fetched in a single API call and you need to call the API | |
multiple times, each time passing a `marker` parameter which | |
is the `Key` of the last element of the previous response. | |
This gist is demonstrating the same. This script uses async/await | |
feature of the Node.js so make sure you have the appropirate |