This README provides step-by-step instructions for deploying the ReliefOps Disaster Response Dashboard, including infrastructure deployment on AWS using Terraform, and running the React frontend locally or via AWS S3 + CloudFront.
Before starting, ensure the following tools and permissions are available:
-
IAM Access: You must have access to the target AWS account. Configure this either via:
- AWS CLI with access and secret keys, or
- AWS SSO (Single Sign-On)
-
Permissions: Ensure your IAM user or role has the following AWS permissions:
- Lambda
- S3
- DynamoDB
- CloudFront
- API Gateway (HTTP APIs - V2)
- AWS Bedrock
- Terraform: Install the Terraform CLI.
- Node.js & npm: Required to run and build the frontend. You can download both from nodejs.org.
- AWS CLI: Required for deploying frontend assets to S3. Install it from AWS CLI docs.
Before deploying the infrastructure, edit the terraform/variables.tf file and set a unique name for the S3 bucket used by the frontend app.
variable "static_web_app_bucket_name" {
default = "your-unique-app-bucket-name"
}
⚠️ The S3 bucket name must be globally unique across AWS.
-
Navigate to the
terraformdirectory:cd terraform -
Initialize the Terraform project:
terraform init
-
Set the AWS CLI profile to use:
export AWS_PROFILE=your_profile_name -
Apply the Terraform configuration:
terraform apply -auto-approve
-
After deployment, note down the API Gateway URL and CloudFront domain — you'll need these for the frontend.
-
Navigate to the
webdirectory at the project root:cd ../web -
Create a file named
.env.localand add the following environment variable, replacing the placeholder with your API Gateway URL:VITE_API_BASE=https://your-api-gateway-url.com
-
Install frontend dependencies:
npm install
-
Start the development server:
npm run dev
-
Open the provided
localhostlink in your browser to view the web app.
To serve the frontend from AWS instead of locally:
-
Build the frontend app:
npm run build
-
Sync the contents of the
dist/folder to your deployed S3 bucket (replace<your-bucket-name>with the one you set earlier):aws s3 sync dist/ s3://<your-bucket-name> --delete
-
Once synced, access the app via the CloudFront domain output by Terraform.
✅ Note: The CloudFront distribution is already configured to serve content from your S3 bucket with appropriate caching and routing rules.
- Keep
.env.localout of version control to protect sensitive data. - If using AWS SSO, make sure your session is active when running AWS CLI or Terraform commands.