AWS S3 SDK for PHP, Uploading to folders inside a bucket


I’m just getting started with the AWS S3 SDK for PHP, I’ve managed to upload a folder of items from my PC to an s3 bucket using PHP, is there any way to specify a folder inside that bucket, for example, instead of uploading image.jpg to imagebucket, it uploads to the folder called images inside ‘imagebucket’.


There is no concept of folders in aws s3. Its just for display purpose used by amazon AWS UI.

Actually it stores filename as key & data as value.

if you store 5 files with different folders, they are not going to create 5 folders.

Leave a Reply