从命令行或程序搜索Amazon S3存储桶

I need to see if the images I upload are being transferred to s3 bucket on AWS.

This bucket has a lot of files in it and scrolling to the bottom would be an insane waste of time. Apparently, AWS interface does not provide a quick way to sort by date or any other columns.

Is there a quick way to search the bucket for a certain file name from command line or perhaps using a PHP script?

There is prefix search/filter available on amazone bucket with PHP, CLI and from AWS console as well.

  1. When you login to console, open your desired bucket on top right corner you have a free text field to filter your files with any prefix. Just place your full file-name or some starting characters there and press enter, You will get your desired data.
  2. With CLI you have to use aws s3 ls s3://mybucket/Prefix here Prefix is where you can place your full file-name or starting characters. Even you can use any word from file name [not necessarily prefix] by using aws s3 ls s3://mybucket | grep 'Search Key Word'. s3/ls
  3. With PHP you can use this helpful tutorial for listing specific files by using prefix ListingObjectKeysUsingPHP