Troubleshooting

/beta/ gives AccessDenied

The Lambda can run, but its IAM role probably cannot list the bucket prefix.

Check s3:ListBucket permission and the s3:prefix condition.

/beta/ gives 404

The Lambda@Edge function may not be attached to the CloudFront behavior, or you are testing /beta without the slash.

This project redirects /beta to /beta/ only if Lambda is actually running.

CloudFront says Lambda role cannot be assumed

Edit the Lambda role trust policy and include:

edgelambda.amazonaws.com

I changed the Lambda but nothing changed online

Lambda@Edge uses published versions.

You must:

1. Deploy the code.

2. Publish a new version.

3. Update CloudFront to the new version ARN.

4. Wait for CloudFront to deploy.

5. Invalidate if needed.

PHP files still download

The directory browser Lambda is not responsible for file headers.

Attach the companion CloudFront Function on Viewer response.

Then check DevTools Network Headers for:

content-type: text/plain; charset=utf-8
content-disposition: inline
x-myanything-source: cloudfront-edge

Markdown files do not render like GitHub

Chrome displays Markdown as raw text. That is normal.

This starter kit makes .md files open inline instead of downloading. Rendering Markdown as styled HTML would require an additional viewer or renderer.

Sorting does not work

Make sure the browser is receiving the latest generated HTML. Invalidate the folder page or use a hard refresh.

Emoji icons look wrong

The generated page includes an emoji-friendly font stack for the icon span. If a system still does not have color emoji fonts, the icons may display as fallback glyphs. The app still works.