version: 0.2 env: variables: REACT_APP_BASE_URL: "http://localhost:5001/" phases: install: commands: # Install Node.js and npm (or you can use the pre-configured Node environment in CodeBuild) echo Installing dependencies... npm install -g npm@latest build: commands: - cd Client - echo Running npm run build in the Client folder... - npm install # Make sure all dependencies are installed - npm run build post_build: commands: # Copy the build output to your S3 bucket echo Copying build files to S3 bucket... aws s3 sync ./Client/build/ s3://your-s3-bucket-name/ --delete artifacts: files: - Client/node_modules