S3
Static files and assets will be stored on S3.
The first thing we have to do is to build the React app.
$ cd packages/web
$ yarn build
Creating an optimized production build...
Compiled successfully.
...
β¨ Done in 20.37s.We now have a build folder:
build
βββ asset-manifest.json
βββ favicon.ico
βββ index.html
βββ manifest.json
βββ precache-manifest.cdaef9d20bdd2939b5087486a61c7d6a.js
βββ robots.txt
βββ service-worker.js
βββ static
βββ js
βββ 0.b9fba7db.chunk.js
βββ 0.b9fba7db.chunk.js.map
βββ 3.b4b93fe8.chunk.js
βββ 3.b4b93fe8.chunk.js.map
βββ 4.d21e26c5.chunk.js
βββ 4.d21e26c5.chunk.js.map
βββ 5.bc17229d.chunk.js
βββ 5.bc17229d.chunk.js.map
βββ 6.0d642d4a.chunk.js
βββ 6.0d642d4a.chunk.js.map
βββ main.cb6ee362.chunk.js
βββ main.cb6ee362.chunk.js.map
βββ runtime-main.416359ae.js
βββ runtime-main.416359ae.js.mapWe are going to upload this to S3.
Creating a bucket
Search for S3 then click the Create bucket button.

Follow the process, use the default values but untick
Block all public access. (I like to name the bucket after the domain e.g daedalost.com)Once the bucket is created, click on it to see the details
Go to
Permissionand paste the following:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AddPerm",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::NAME_OF_BUCKET/*"
]
}
]
}Replace NAME_OF_BUCKET with your bucket's name.
Everyone on the internet can now access this bucket.

Go to Properties > Static website hosting > Use this bucket to host a website:
Index document:
index.htmlError document:
index.html

This endpoint now serves the React app. It won't work at the moment since it doesn't connect to our API. Though, you can hard code http://localhost:8080 as the endpoint to test it locally.
Last updated
Was this helpful?