Skip to content

NazBilgic/bedrock-reliefops

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReliefOps AI Dashboard

Overview

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.


Prerequisites

Before starting, ensure the following tools and permissions are available:

✅ AWS Access

  • 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

✅ Tools

  • 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.

Deployment Guide

1. Configure S3 Bucket Name (Important)

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.


2. Deploy AWS Infrastructure (via Terraform)

  1. Navigate to the terraform directory:

    cd terraform
  2. Initialize the Terraform project:

    terraform init
  3. Set the AWS CLI profile to use:

    export AWS_PROFILE=your_profile_name
  4. Apply the Terraform configuration:

    terraform apply -auto-approve
  5. After deployment, note down the API Gateway URL and CloudFront domain — you'll need these for the frontend.


3. Run the React Frontend Locally

  1. Navigate to the web directory at the project root:

    cd ../web
  2. Create a file named .env.local and add the following environment variable, replacing the placeholder with your API Gateway URL:

    VITE_API_BASE=https://your-api-gateway-url.com
  3. Install frontend dependencies:

    npm install
  4. Start the development server:

    npm run dev
  5. Open the provided localhost link in your browser to view the web app.


4. (Optional) Deploy Frontend to AWS S3 + CloudFront

To serve the frontend from AWS instead of locally:

  1. Build the frontend app:

    npm run build
  2. 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
  3. 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.


Notes

  • Keep .env.local out of version control to protect sensitive data.
  • If using AWS SSO, make sure your session is active when running AWS CLI or Terraform commands.

About

AI-powered disaster response platform built with AWS Bedrock, Lambda, and Terraform.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors