Import CSV file from S3 Bucket
To detect folders created and files added to an S3 bucket, you need to Flush s3 media file metadata cache.

To do it,
Configuration > Media > S3 File System > Actions > File Metadata Cache > Refresh File Metadata Cache

The file metadata cache keeps track of every file that S3 File System writes to (and deletes from) the S3 bucket, so that queries for data about those files (checks for existence, filetype, etc.) don't have to hit S3. This speeds up many operations, most noticeably anything related to images and their derivatives.

This button queries S3 for the metadata of all the files in your site's bucket (unless you use the Root Folder option), and saves it to the database. This may take a while for buckets with many thousands of files. 
It should only be necessary to use this button if you've just installed S3 File System and you need to cache all the pre-existing files in your bucket, or if you need to restore your metadata cache from scratch for some other reason.