Skip to content

Terraform Init

From the demo repository root, initialize Terraform
HashiCorp Terraform — provisions all platform infrastructure through five modules in `terraform/`.
before creating any AWS
Amazon Web Services — cloud platform for ingest, processing, storage, API, and portal hosting in this walkthrough.
resources. This walkthrough uses -chdir=terraform for all Terraform commands.

Terminal window
git clone https://github.com/jajera/event-driven-serverless-platform-demo.git
cd event-driven-serverless-platform-demo
terraform -chdir=terraform init

Terraform downloads the AWS and archive providers (requires Terraform >= 1.6, AWS provider >= 5.0).

After init, preview what will be created:

Terminal window
terraform -chdir=terraform plan -var="region=ap-southeast-2"

The plan creates resources across five modules: ingest, ingest-scheduler, processing, presentation, and observability. Key defaults:

VariableDefaultDescription
regionap-southeast-2AWS region
source_bucketgeonet-open-data

GeoNet
GeoNet open data — public S3 bucket `geonet-open-data` with GNSS RINEX hourly files under `gnss/rinexhourly/`. Not owned by this stack; no push notification when new files arrive.
public bucket

lookback_hours1

Ingest
Ingest configuration — UTC rolling window (default 1 hour) defining how far back ingest-sync scans for new RINEX files.
rolling window (UTC hours)

schedule_expressionrate(1 hour)

Scheduler
AWS EventBridge Scheduler — triggers ingest-sync Lambda on a recurring UTC schedule (default: hourly).
cadence

processor_image_taglatest

ECR
Amazon Elastic Container Registry — stores the mirrored processor Lambda container image at deploy time.
tag (must match sync script)

deploy_amplify_on_applytrue

Build and zip-deploy portal
AWS Amplify — hosts the Vite portal SPA. This walkthrough deploys via manual zip upload (no Git connection required).
on apply

See Terraform Variables for the full list.

  1. ECR and Processor Image — create ECR repo and mirror GHCR image
  2. Staged Apply — apply processing, then scheduler, then full stack
  3. Amplify Portal — confirm or manually deploy the frontend
  4. CORS Lockdown — restrict API Gateway CORS to the portal hostname
Terminal window
terraform -chdir=terraform version
terraform -chdir=terraform providers

Both commands should exit 0 with provider versions listed.