skip to Main Content

Creating a new folder in an existing bucket displays this message at the top of the page every time, I am not running into any problems creating folders or uploading data so what does this actually mean? I can’t seem to find any answers as to why this is displayed, perhaps its just default no matter the policy setup?

Your bucket policy might block folder creation
If your bucket policy prevents uploading objects without specific tags, metadata, or access control list (ACL) grantees, you will not be able to create a folder using this configuration. Instead, you can use the upload configuration to upload an empty folder and specify the appropriate settings.

2

Answers


  1. Just confirmed that the new user interface of S3 bucket now shows this message when creating a folder!

    enter image description here

    I can also confirm that my bucket had no default bucket policy configured on it. I think that this warning was introduced by the S3 team to keep the user interface friendly and informative.

    Login or Signup to reply.
  2. Folders doesn’t exist in S3, empty folders are not created explicitly but can be simulated by creating zero-byte objects with keys that represent the desired folder structure.

    Check out this thread: Empty folders in AWS S3

    Even after that being said you still can’t put objects or upload the zero-byte objects, it may be related to this:

    https://docs.aws.amazon.com/AmazonS3/latest/userguide/using-folders.html

    If your bucket policy prevents uploading objects to this bucket without tags, metadata, or access control list (ACL) grantees, you can’t create a folder by using the following procedure. Instead, upload an empty folder and specify the following settings in the upload configuration.

    Here is an example of a S3 policy that grants access to putObjects on the bucket and in the "folder structure":

    {
      "Version": "2012-10-17",
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "s3:ListBucket",
            "s3:PutObject"
          ],
          "Resource": "arn:aws:s3:::your-bucket-name"
        },
        {
          "Effect": "Allow",
          "Action": [
            "s3:GetObject",
            "s3:PutObject",
            "s3:DeleteObject",
            "s3:ListBucketMultipartUploads",
            "s3:AbortMultipartUpload",
            "s3:ListMultipartUploadParts"
          ],
          "Resource": "arn:aws:s3:::your-bucket-name/*"
        }
      ]
    }
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search