Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,25 @@ This is a one-time setup. The bootstrap script creates the S3 bucket (with a ran
```bash
export AWS_PROFILE=<your-profile-name>
export REGION=<your-region>
./scripts/bootstrap.sh <your-profile-name>
export ENVIRONMENT=dev # or: prod
./scripts/bootstrap.sh $ENVIRONMENT
```

> Keep these three variables exported in your shell for the remaining steps.

### 2. Configure Terraform Variables

```bash
cp terraform/environments/dev.tfvars.example terraform/environments/<your-profile-name>.tfvars
# Edit dev.tfvars with your desired region, etc.
cp terraform/environments/dev.tfvars.example terraform/environments/$ENVIRONMENT.tfvars
# Edit only if you need to override defaults; region comes from $REGION.
```

### 3. Deploy Infrastructure

This builds all Lambda packages and provisions the full AWS stack (VPC, Neptune, DynamoDB, Cognito, API Gateway, ECS, S3, CloudFront, etc.):

```bash
./scripts/deploy-terraform.sh <your-profile-name>
./scripts/deploy-terraform.sh $ENVIRONMENT
```

After deployment, agent workers authenticate with Kiro CLI via device flow. Check the agent pool DynamoDB table or ECS logs for the auth URL and device code.
Expand All @@ -79,7 +82,7 @@ Create users in the Cognito User Pool. The User Pool ID is available via `terraf
### 6. Deploy Frontend

```bash
./scripts/deploy-frontend.sh <your-profile-name>
./scripts/deploy-frontend.sh $ENVIRONMENT
```

The application is available at the CloudFront domain:
Expand Down
2 changes: 1 addition & 1 deletion scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ENVIRONMENT=${1:-dev}
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
PROJECT_NAME="collaborative-ai-dlc"
REGION="us-east-1"
REGION="${REGION:-us-east-1}"

if [[ "$ENVIRONMENT" != "dev" && "$ENVIRONMENT" != "prod" ]]; then
echo "Usage: $0 [dev|prod]"
Expand Down
3 changes: 3 additions & 0 deletions scripts/deploy-frontend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ fi

# Build frontend
cd "$SCRIPT_DIR/../frontend"
echo "Installing frontend dependencies..."
npm ci

echo "Building frontend..."
npm run build

Expand Down
4 changes: 4 additions & 0 deletions scripts/deploy-terraform.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ fi

echo "Deploying environment: $ENVIRONMENT"

# Pass $REGION through to Terraform's aws_region variable so the bootstrap region,
# AWS CLI region, and provider region all stay in sync from a single env var.
export TF_VAR_aws_region="${REGION:-us-east-1}"

echo "Installing root npm dependencies..."
(cd "$SCRIPT_DIR/.." && npm ci)

Expand Down
4 changes: 4 additions & 0 deletions scripts/destroy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ fi

cd "$TF_DIR"

# Match deploy-terraform.sh: derive aws_region from $REGION so destroy targets
# the same region the stack was deployed to.
export TF_VAR_aws_region="${REGION:-us-east-1}"

# Ensure we're initialised against the right backend
terraform init -reconfigure -backend-config="environments/${ENVIRONMENT}.s3.tfbackend"

Expand Down
5 changes: 4 additions & 1 deletion terraform/environments/dev.tfvars.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
environment = "dev"
aws_region = "us-east-1"

# aws_region is sourced from the REGION env var (via TF_VAR_aws_region in
# deploy-terraform.sh). Uncomment below only to override that.
# aws_region = "us-east-1"

# Bedrock model pinning (for claude and opencode drivers)
bedrock_model = "us.anthropic.claude-sonnet-4-6"
Loading