How to host three.js app on AWS?

I’ve recently been developing a three.js app locally using NPM/Webpack. I install dependencies with npm, import them with, along with static files(mp3s, pngs, etc) using the ES6 import syntax, and Webpack bundles everything together and serves it via a local DevServer. Here’s a rough outline of my project’s file structure:

├─ bundler/
│ ├─ webpack.common.js
│ ├─
│ ├─
├─ node_modules/
├─ src/
│ ├─ index.html
│ ├─ style.css
│ ├─ app.js
├─ static/
│ ├─ bakedTexture1.png
│ ├─ bakedTexture2.png
│ ├─ song.mp3
│ ├─ scene.glb

What’s the ideal way to get my app running on AWS? Do I even need npm and Webpack? If not, how do all of my dependencies get managed when my app has been deployed?

There are a number of ways how web apps can be deployed on AWS. E.g. a simple static website on S3, by treating your app as a node.js application/npm package and installing it on Beanstalk or by provisioning a server via EC2 and make the deployment by yourself. There are probably even more (newer) options, I’m actually not up-to-date.

Considering your project structure, it’s probably best to start with Beanstalk.