/beta/ gives AccessDeniedThe Lambda can run, but its IAM role probably cannot list the bucket prefix.
Check s3:ListBucket permission and the s3:prefix condition.
/beta/ gives 404The 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.
Edit the Lambda role trust policy and include:
edgelambda.amazonaws.com
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.
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
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.
Make sure the browser is receiving the latest generated HTML. Invalidate the folder page or use a hard refresh.
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.