Skip to content

Common Issues

Operational issues grouped by component. Commands assume the demo repo
event-driven-serverless-platform-demo — source repository for Terraform, Lambda services, portal, and scripts. Commands run from its root with `terraform -chdir=terraform` unless stated otherwise.
root with terraform -chdir=terraform.

Verify Terraform
HashiCorp Terraform — provisions all platform infrastructure through five modules in `terraform/`.
>= 1.6 and AWS
Amazon Web Services — cloud platform for ingest, processing, storage, API, and portal hosting in this walkthrough.
credentials:

Terminal window
terraform --version
aws sts get-caller-identity
terraform -chdir=terraform init -upgrade

See Terraform Init.

Processor Lambda fails on apply — image not found

Section titled “Processor Lambda fails on apply — image not found”

Mirror the image before full apply:

Terminal window
terraform -chdir=terraform apply -target=module.processing[0].aws_ecr_repository.processor_image
./scripts/sync-processor-image.sh

See ECR and Processor Image.

Re-deploy manually:

Terminal window
export AMPLIFY_APP_ID="$(terraform -chdir=terraform output -raw amplify_app_id)"
export VITE_API_URL="$(terraform -chdir=terraform output -raw api_url)"
export WEB_SOURCE_DIR="$(pwd)/web"
./scripts/deploy-amplify.sh

See Amplify Portal.

Confirm stage 2 of staged apply ran:

Terminal window
terraform -chdir=terraform apply -var="region=ap-southeast-2" -target=module.ingest_scheduler
aws scheduler list-schedules --query "Schedules[?contains(Name, 'ingest-sync')]"

See EventBridge Scheduler.

Trigger manual ingest:

Terminal window
aws lambda invoke --function-name ingest-sync --payload '{}' /dev/stdout
aws s3 ls "s3://$(terraform -chdir=terraform output -raw bucket_name)/raw/rinexhourly/" --recursive | head

See Manual Ingest.

Check CloudWatch
Amazon CloudWatch — alarms, dashboard (`event-driven-platform`), and structured Lambda logs for observability.
Logs for the ingest-sync function. Common causes: invalid LOOKBACK_HOURS, GeoNet bucket access, or IAM
AWS Identity and Access Management — execution roles and policies for Lambdas, Scheduler, API Gateway, and S3.
permission gaps.

Check processor
Processor Lambda container — runs PyTECGg calibration per SQS message; adopted when a Batch on Fargate parallel-execution quota increase was rejected. Image from `ghcr.io/platformfuzz/tec-processor-image` mirrored to ECR.
health and concurrency:

Terminal window
aws lambda get-function-configuration --function-name processor \
--query '{State:State,LastUpdateStatus:LastUpdateStatus}'
aws cloudwatch describe-alarms --alarm-names processor-lambda-throttles \
--query 'MetricAlarms[].StateValue'

Request a Lambda
AWS Lambda — serverless compute for ingest-sync, query-api, reprocess-api, and the processor container image.
concurrency quota increase if throttles persist. See Processor Lambda and SQS Queues.

Inspect DLQ
Dead-letter queue — SQS queue receiving messages that exceeded maxReceiveCount (5). CloudWatch alarms fire when visible count ≥ 1.
messages and processor logs. Messages arrive after 5 failed processing attempts:

Terminal window
aws cloudwatch describe-alarms --alarm-names dlq-messages-visible reprocess-dlq-messages-visible

See Alarms and Dashboard.

Verify ECR
Amazon Elastic Container Registry — stores the mirrored processor Lambda container image at deploy time.
image exists and tag matches:

Terminal window
terraform -chdir=terraform output -raw processor_image_uri
./scripts/sync-processor-image.sh
terraform -chdir=terraform apply -var="region=ap-southeast-2"

Confirm raw files exist and processor is consuming queues:

Terminal window
aws s3 ls "s3://$(terraform -chdir=terraform output -raw bucket_name)/raw/rinexhourly/" --recursive | head
aws sqs get-queue-attributes \
--queue-url "$(terraform -chdir=terraform output -raw queue_url)" \
--attribute-names ApproximateNumberOfMessages ApproximateNumberOfMessagesNotVisible

See S3 Processed Output.

Apply CORS lockdown after first deploy:

Terminal window
terraform -chdir=terraform apply \
-var="region=ap-southeast-2" \
-var="amplify_domain=$(terraform -chdir=terraform output -raw cors_domain)"

See CORS Lockdown.

Catalog lists processed output only — not raw ingest keys. Wait for processor to write under processed/tec/ or submit a reprocess job. See S3 Key Patterns.

Narrow time range or add sv filter. Default cap is 2000 rows. See REST API Usage.

Only allowlisted parameter keys are accepted. See SQS Message Schemas.

Rebuild and redeploy:

Terminal window
cd web && npm install && npm run build
export WEB_SOURCE_DIR="$(pwd)/web"
export AMPLIFY_APP_ID="$(terraform -chdir=terraform output -raw amplify_app_id)"
export VITE_API_URL="$(terraform -chdir=terraform output -raw api_url)"
./scripts/deploy-amplify.sh

See Portal verification.

Subscribe to the SNS
Amazon Simple Notification Service — publishes CloudWatch alarm notifications; subscribe an email endpoint after deploy.
topic:

Terminal window
TOPIC_ARN="$(terraform -chdir=terraform output -raw alarm_topic_arn)"
aws sns subscribe --topic-arn "$TOPIC_ARN" --protocol email --notification-endpoint "you@example.com"

Confirm subscription from email. See Alarms and Dashboard.

If terraform destroy fails on the S3
Amazon Simple Storage Service — data lake bucket for raw ingest and processed TEC output; S3 events trigger processing.
bucket, empty it first — see Teardown.