aws s3 bucket browser
3.1.2

AWS S3 버킷을 탐색하려면 단일 HTML 파일
/ 폴더로 처리하고 표시합니다manifest.plist 에 대한 Install 버튼을 표시하십시오 index.html 다운로드하여 버킷에 업로드하십시오.index.html 내에서 구성을 조정하십시오 const config = {
title : 'Bucket Browser' , // prefix value with `HTML> ` to render as html, see subtitle
subtitle : 'HTML>made with ♥ by <b><a href="https://qoo.monster">qoomon</a></b>' , // prefix value with `HTML> ` to render as html
logo : 'https://qoomon.github.io/aws-s3-bucket-browser/logo.png' ,
favicon : 'https://qoomon.github.io/aws-s3-bucket-browser/favicon.ico' ,
primaryColor : '#167df0' ,
bucketUrl : undefined ,
// If bucketUrl is undefined, this script tries to determine bucket Rest API URL from this file location itself.
// This will only work for locations like these
// * https://s3.amazonaws.com/BUCKET-NAME/index.html
// * https://s3.BUCKET-REGION.amazonaws.com/BUCKET-NAME/index.html
// * http://BUCKET-NAME.s3-website-BUCKET-REGION.amazonaws.com/index.html
// * https://storage.googleapis.com/BUCKET-NAME/index.html
// * https://BUCKET-NAME.s3-web.BUCKET-REGION.cloud-object-storage.appdomain.cloud/
// * https://BUCKET-NAME.BUCKET-REGION.digitaloceanspaces.com
// * https://BUCKET-NAME.BUCKET-REGION.cdn.digitaloceanspaces.com
// If bucketUrl is set manually, ensure this is the bucket Rest API URL, e.g.
// * https://s3.amazonaws.com/BUCKET-NAME
// * https://storage.googleapis.com/BUCKET-NAME
// The URL should return an XML document with <ListBucketResult> as root element.
rootPrefix : undefined , // e.g. 'subfolder/'
keyExcludePatterns : [ / ^index.html$ / ] , // matches againt object key relative to rootPrefix
pageSize : 50 ,
bucketMaskUrl : undefined ,
// If bucketMaskUrl is set file urls will be changed from ${bucketUrl}/${file} to ${bucketMaskUrl}/${file}
// bucketMaskUrl: 'https://example.org'
// => https://example.org/foo/bar.txt
// bucketMaskUrl: document.location.origin
// => ${document.location.origin}/foo/bar.txt
defaultOrder : 'name-asc' // (name|size|dateModified)-(asc|desc)
} https://s3.console.aws.amazon.com/s3/buckets/<YOUR BUCKET NAME>/?tab=permissions 으로 이동하십시오Access Control List 또는 Bucket Policy 으로 공개 읽기 권한 부여Everyone 위한 List objects 활성화하십시오{
"Version" : " 2012-10-17 " ,
"Statement" : [
{
"Sid" : " PublicRead " ,
"Principal" : " * " ,
"Effect" : " Allow " ,
"Action" : [
" s3:ListBucket " ,
" s3:GetObject "
],
"Resource" : [
" arn:aws:s3:::<YOUR BUCKET NAME> " ,
" arn:aws:s3:::<YOUR BUCKET NAME>/* "
]
}
]
}CORS Configuration 확인해야 할 수도 있습니다.https://s3.console.aws.amazon.com/s3/buckets/<YOUR BUCKET NAME>/?tab=permissions 으로 이동하십시오CORS Configuration 에 따라 크로스 원산지 액세스 권한 부여, 버킷 브라우저 index.html 주소로 http://www.example.com 교체하십시오.http://example.s3-website-eu-central-1.amazonaws.com/index.html [
{
"AllowedHeaders" : [
" * "
],
"AllowedMethods" : [
" GET "
],
"AllowedOrigins" : [
" http://www.example.com " ,
" https://BUCKET-NAME.s3.amazonaws.com " ,
" https://s3.BUCKET-REGION.amazonaws.com/BUCKET-NAME " ,
],
"ExposeHeaders" : [
" x-amz-server-side-encryption " ,
" x-amz-request-id " ,
" x-amz-id-2 "
],
"MaxAgeSeconds" : 3000
}
]<YOUR BUCKET URL>/index.html 엽니 다. index.html 열고 bucket 요청 매개 변수로 버킷 URL을 제공합니다.${INDEX_FILE_LOCATION}?bucket=${S3_BUCKET_URL}https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.eu-west-1.amazonaws.com/data.openspending.orgS3 버킷 앞에서 Cloudfront를 사용하는 경우 다음 클라우드 프론트 설정을 확인하십시오.
GET , HEAD , OPTIONSWhitelistAccess-Control-Request-HeadersAccess-Control-Request-MethodOriginForward all IBM Cloud Object Storage는 가상 호스트 스타일 주소, 즉 https://<bucket-name>s3-web.<region>.cloud-object-storage.appdomain.cloud/ 그렇지 않으면이 튜토리얼의 지침에 따라 버킷을 구성하십시오. 또한 버킷의 CORS를 구성해야 할 수도 있습니다.
< CORSConfiguration >
< CORSRule >
< AllowedOrigin >*</ AllowedOrigin >
< AllowedMethod >GET</ AllowedMethod >
< AllowedHeader >*</ AllowedHeader >
</ CORSRule >
</ CORSConfiguration >