I have a use case where I programmatically bring up an EC2 instance, copy an executable file from S3, run it and shut down the instance. I need to get only the last added file from S3.
Is there a way to get the last modified file/object from an S3 bucket using the AWS CLI tool?