简体   繁体   English

AWS S3目录列出“?delimiter = /”问题

[英]AWS S3 directory listing “?delimiter=/” issue

I am following the S3 directory listing using the code & following the steps mentioned here : https://github.com/rufuspollock/s3-bucket-listing (3. Use Amazon S3 in website mode with prefix mode) Error: [object Object] 我使用代码按照S3目录列表并按照此处提到的步骤操作: https//github.com/rufuspollock/s3-bucket-listing (3。在带有前缀模式的网站模式下使用Amazon S3)错误:[object Object ]

The Chrome console shows http://[bucket].s3-us-east-1.amazonaws.com/?delimiter=/ net::ERR_NAME_NOT_RESOLVED Chrome控制台显示http:// [bucket] .s3-us-east-1.amazonaws.com /?delimiter = / net :: ERR_NAME_NOT_RESOLVED

index.html code index.html代码

<!DOCTYPE html>
<html>
<head>
  <title>S3 Bucket Listing Generator</title>
</head>
<body>
  <div id="navigation"></div>
  <div id="listing"></div>

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script type="text/javascript">
    var S3BL_IGNORE_PATH = true;
   // var BUCKET_NAME = 'tests3kv';
    var BUCKET_URL = 'http://[bucket].s3-us-east-1.amazonaws.com';
    //var S3B_ROOT_DIR = 'SUBDIR_L1/SUBDIR_L2/';
    var S3B_SORT = 'NEW2OLD';
    //var EXCLUDE_FILE = 'index.html';
    //var AUTO_TITLE = true;
    //var S3_REGION = 's3'; // for us-east-1
</script>
<script type="text/javascript" src="http://rawgit.com/rufuspollock/s3-bucket-listing/gh-pages/list.js"></script></body>
</html>

i am invoking the site using http://[bucket].s3-website-us-east-1.amazonaws.com 我正在使用http:// [bucket] .s3-website-us-east-1.amazonaws.com调用该网站

There is no REST endpoint in the us-east-1 region supporting the format https://bucketname.s3-us-east-1.amazonaws.com . us-east-1区域中没有支持格式https://bucketname.s3-us-east-1.amazonaws.com REST端点。

The us-east-1 region is the original S3 region and works differently than all the other regions in that regard. us-east-1区域是原始的S3区域,在这方面的工作方式与所有其他区域不同。

Use one of these forms, instead: 请改用以下形式之一:

https://bucketname.s3.amazonaws.com
https://bucketname.s3-external-1.amazonaws.com
https://bucketname.s3.dualstack.us-east-1.amazonaws.com

The last one supports both IPv4 and IPv6. 最后一个支持IPv4和IPv6。 Otherwise, these all function identically. 否则,这些都具有相同的功能。

http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM