I\'m able to create an S3 bucket using cloudformation but would like to create a folder inside an S3 bucket..like
-->
<
We cannot (at least as of now) create a sub folder inside s3 bucket.
You can try using following command :
aws s3 mb s3://yavdhesh-bucket/inside-folder
And then try to list all the folders inside the bucket using command:
aws s3 ls s3://yavdhesh-bucket
And you will observe that the sub folder was not created.
there is only one way to create a subfolder, that is by creating/copying a file inside a non-existing sub folder or sub directory (with respect to bucket)
For example,
aws s3 cp demo.txt s3://yavdhesh-bucket/inside-folder/
Now if you list down the files present inside your sub-folder, it should work.
aws s3 ls s3://yavdhesh-bucket/inside-folder/
it should list down all the files present in this sub folder.
Hope it helps.