s3 autoindex
1.0.0
Static website to generate directory listing for S3 buckets.
Clone the repository and edit config.js, configuring it with your bucket.
window.S3_BUCKET_URL to bucket's REST endpoint.window.SECRET_BUCKET_URL to your AES-encrypted REST endpoint. Doing so will obfuscate your public S3 url and password protect your directory listing. An encrypt function is available in js/encryption.js for generating encrypted URLs.Note: The S3 REST endpoint used differs from S3's website endpoint. For more details, see: Website Rest EndpointDiff.
You must setup the S3 website bucket to allow public read access.
Grant Everyone the List and View permissions:
Assign the following Bucket Policy:
{
"Version": "2008-10-17",
"Statement": [
{
"Sid": "AllowPublicRead",
"Effect": "Allow",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::{your-bucket-name}/*"
}
]
}
<CORSConfiguration>
<CORSRule>
<AllowedOrigin>*</AllowedOrigin>
<AllowedMethod>GET</AllowedMethod>
<AllowedHeader>*</AllowedHeader>
</CORSRule>
</CORSConfiguration>