I want to fetch objects after a particular date. Using the AWS CLI I can list objects using below command:
aws s3api list-objects-v2 --bucket "bucket1" --prefix "file-" --query "(Contents[?LastModified>'2019-02-06T05:34:12.000Z'])[0]"
But I want to do it from my code so please let me know how can I filter objects usin NPM AWS-SDK.
Note: I can do it using exec
or spawn
but for this I have to configure profile using CLI which will create credential file on local so I dont want to do this.