I am planning to deploy next.js static export to s3 bucket with Node JS script.
I have setup a S3 bucket for static website hosting.
I get the expected behaviour when I simply drag and drop the static export to the S3 bucket so I pretty sure I setup the S3 bucket correctly.
But when I try to upload it with a Node JS script, despite all the files appear in the bucket, the behaviour of static website hosting seems to break.
My script is basically copy from with a twist on reading the environment variable on .env:
Upload entire directory tree to S3 using AWS sdk in node js
More Info and steps to reproduce this problem is in the Testing Repo.
Testing Repo:
https://github.com/vmia159/aws-upload-test
I appreciate if someone can have an idea about the issues.