s3fs挂载文件夹出现"NoSuchKey"问题


How to create a folder(key) without any contents

Issue

  • s3fs failed to mount a folder with error
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]:      check a bucket.
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]:      URL is https://s3.cn-north-1.amazonaws.com.cn/xxxxxx/1/
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]:      URL changed is https://xxxxx.s3.cn-north-1.amazonaws.com.cn/1/
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]:      computing signature [GET] [/1/] [] []
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]:      url is https://s3.cn-north-1.amazonaws.com.cn
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]:      HTTP response code 404 was returned, returning ENOENT
Nov 30 10:44:24 ip-172-31-7-64 s3fs[5578]: curl.cpp:CheckBucket(3553): Check bucket failed, S3 response: <?xml version="1.0" encoding="UTF-8"?>#012<Error><Code>NoSuchKey</Code><Message>The specified key does not exist.</Message><Key>1/</Key><RequestId>xxxxxxxx</RequestId><HostId>0Iqvxjsi/A05Z4WD3rLqn4ulPMj4I5dlCAUMTkMRRQBEYsEzYPavPV1WglkMnybOKsBZqFyinUo=</HostId></Error>

Solution

  • create a key without any contents

    aws s3api put-object --body test.txt --key 1/ --bucket terry-elb
    


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM