I\'m able to create an S3 bucket using cloudformation but would like to create a folder inside an S3 bucket..like
-->
<
This is not possible using an AWS CloudFormation template.
It should be mentioned that folders do not actually exist in Amazon S3. Instead, the path of an object is prepended to the name (key
) of an object.
So, file bar.txt
stored in a folder named foo
is actually stored with a Key of: foo/bar.txt
You can also copy files to a folder that doesn't exist and the folder will be automatically created (which is not actually true, since the folder itself doesn't exist). However, the Management Console will provide the appearance of such a folder and the path will suggest that it is stored in such a folder.
Bottom line: There is no need to pre-create a folder. Just use it as if it were already there.