Logo

dev-resources.site

for different kinds of informations.

Creating a react game on AWS

Published at
1/14/2025
Categories
react
aws
webdev
vite
Author
Sura
Categories
4 categories in total
react
open
aws
open
webdev
open
vite
open
Creating a react game on AWS

**Prerequisites
**AWS Account
Installed Node.js and npm
React Vite project created (npx create-vite@latest)

Setup the React + Vite Game
Initialize React Vite Project

npx create-vite@latest my-game --template react
cd my-game
npm install
npm run dev

Ensure your game works locally.

Install Amplify CLI:
Initialize Amplify
npm install -g @aws-amplify/cli

Configure Amplify CLI:
amplify configure

Use either:

Frontend Secrets: For frontend access (AMPLIFY_API_VAR).

IAM Keys: For backend-specific operations (e.g., server-to-server communication).

Tip: If your game only fetches API data, use frontend secrets (AMPLIFY_API_VAR).

Configure CI/CD for Deployment
Connect Git Repository:

Link your GitHub/Bitbucket/GitLab repository to Amplify via the Amplify Console.

Set up the build process in the Build Settings (Amplify auto-generates amplify.yml for deployment).

Checkout my current in progress development: https://main.d28exdxgub7wqp.amplifyapp.com/
Image description

Featured ones: