1 Answer
- Newest
- Most votes
- Most comments
0
Hi,
the value you specify here is the "object name" (i.e. Key) in the S3 bucket. The "object name" can include "folders" as part of the "key".
For example, if you have a bucket called "example-bucket", and you specified
file_path='myDog.jpg'
s3.put_object(Bucket=BUCKET_NAME, Key=file_path, Body=file_content)
If you viewed your bucket in the AWS S3 console, you would see 'myDog.jpg' as a top level object.
You could also include "folders". For example:
file_path='pets/mydog.jpg'
s3.put_object(Bucket=BUCKET_NAME, Key=file_path, Body=file_content)
Now, if you want to your AWS S3 console, and opened your bucket, you would see a "folder" called pets. If you clicked on the "pets folder", you would then see myDog.jpg.
Hope this helps,
-randy
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 22 days ago
- AWS OFFICIALUpdated a year ago