-1

I want to create folder under the existing s3 bucket using saltstack. How can we create directory\folder user s3 bucket using saltstack?

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
  • Why do you wish to create a folder? Amazon S3 is a flat object storage service. It does not require folders. You can simply store an object with a complete path in the Key (eg `folder1/foo.txt`) without having to create the folders. They will "appear" to be there, but they actually don't exist. – John Rotenstein Oct 16 '19 at 11:24
  • Hi John, we are configuring our application with the S3 bucket and each process of the application we want files from those process should be moved to their corresponding directory. Yes its all key path in S3 actually there is no directory thing in S3. But for us we should have the key\directory already exists prior we configure it in the application. – Santosh Kadam Oct 16 '19 at 13:16

2 Answers2

0

We can create folder under S3 bucket using s3.put bucket_name folder_name/

0

Empty "directories" cannot exist in S3, because directories do not exist.

You can put / in object keys, but you have to put an object there.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207