Skip to content

problem with creating virtual directory object on S3 China (Beijing) region #643

Closed

Description

@Eliyahu-Machluf

Hi,

I'm working with the aws-sdk-cpp with the China region, Beijing (cn-north-1), S3 service. I'm trying to create a virtual directory (an empty object which its name ends with slash. e.g. 'my_dir/' sized 0 bytes). S3 Browser shows this as a directory. and i need the ability to have directories tree with some empty directories (otherwise, if part of object name is slash it is already shown as directory e.g. my_dir/a.dat is shown as directory named 'my_dir' and a file named 'a.dat' within this directory).

When trying to create such empty object, with name ending with slash, I get a strange error, that my credentials are bad (though I use valid credentials).
I tried to create an object named 'test_ufs_mkdir.1503820374/' and got an error:
error code ;
error message
error is Non Retriable

This code works fine on other regions, but fails on this specific Bijing region (cn-north-1).

Any idea?

Thanks.

Eliyahu

Activity

  1. singku commented on Aug 28, 2017

    @singku
    Contributor

    Is your credentials purposely created for Chinese region only?

  2. Eliyahu-Machluf commented on Aug 28, 2017

    @Eliyahu-Machluf
    Author

    Hi,

    I don't know (as I got the credentials from someone else at company), but I think it is for China only.

    The credentials are OK, as I succeeded to upload regular files to S3. It only gives error for files which their name end with '/'

  3. wps132230 commented on Aug 29, 2017

    @wps132230
    Contributor

    Hi, AWS in China is operated by Beijing Sinnet Technology Co., Ltd.(“Sinnet”), I guess some behavior may be different, and I am requesting an AWS in China account to reproduce this problem.

    And for now, have you tried to create a empty object named my_dir/""? It works just like my_dir/ in other regions, but I am not sure if it works for China region.

    If that still does not work, I would recommend to create an "empty" directory by creating an empty dummy file under you directory. For example, in you case, you could create an object named test_ufs_mkdir.1503820374/.dummy.

  4. Eliyahu-Machluf commented on Aug 30, 2017

    @Eliyahu-Machluf
    Author

    Hi,

    I've just now tried again the same code, and for my surprise, it worked, and I succeeded to create an empty object with forward slash as suffix (e.g. "my_dir/"). I did not change anything at my code, I simply run again the test utility which previously failed to create the object and now succeeded.

  5. added
    help wantedWe are asking the community to submit a PR to resolve this issue.
    and removed on Apr 19, 2019
  6. added a commit that references this issue on May 1, 2020
  7. added a commit that references this issue on May 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedWe are asking the community to submit a PR to resolve this issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions