How to access a folder object inside S3 bucket. How can I access a folder inside S3 bucket using python boto3.
Code is working for a folder in S3 bucket but to for folders inside S3 bucket
If I understand you correctly.. I had this issue in my python3 script. Basically you need to pass the to the boto3 function an s3 bucket and the file name. Make this file name include the folder, with the forward slash separating them. Instead of passing just the file name and trying to pass the folder as a separate parameter. 
So if you have MyS3Bucket and you want to upload file.txt to MyFolder inside MyS3Bucket, then pass the file_name=“MyFolder”+”/“+”file.txt” as a parameter to the upload function.
Let me know if you need a code snippet. 
Even if you don’t have the folder in the S3 bucket, boto3 will create it for you on the fly. This is cool because you can grant access in s3 based on a folder, not just the whole bucket at once. 
Good luck!
How to upload file to folder in aws S3 bucket using python boto3