AWS Lambda ElastiCache API Gateway CloudFront Multi-Region

Low-latency Global Serverless App

Multi-region, low-latency serverless logic with access to the same dataset, also at low latency. Stateful data is replicated cross-region using ElastiCache Global Datastores. Infrastructure spans multiple AWS accounts (DEV, STAGING, PROD) with automated CI/CD via GitHub Actions.

Edge & Delivery

DNS RoutingCloudflare (latency-based)
CDNAWS CloudFront (per environment)
WAFAWS Managed Rules (Core, IPs)
Static AssetsS3 (private, accessed via OAC)

Compute (Serverless)

EntrypointAPI Gateway (HTTP API)
BackendAWS Lambda
Regionseu-west-1, us-west-2, ap-southeast-1
SecurityVPC integration, least-privilege IAM

Data & State

EngineElastiCache Redis
ReplicationGlobal Datastore (cross-region)
LatencySub-millisecond access
UpdatesSynced via GitHub Actions

CI/CD Pipeline

PlatformGitHub Actions
AuthOIDC to AWS
EnvironmentsDEV, STAGING, PROD
ScopeLambdas, Link Indexes (S3 & Redis)

Architecture Deep Dive

Multi-Region Active-Active

To ensure global low latency, the application is deployed actively across three major AWS regions: Europe, US West, and Asia Pacific. Cloudflare routes incoming user traffic to the nearest regional CloudFront distribution. From there, dynamic API requests fall back to the regional API Gateway and Lambda functions, ensuring the shortest path for every user.

Global State with ElastiCache

Stateful link mappings must be queried at high speeds. Rather than relying on a centralized database that would introduce cross-globe latency, we use ElastiCache Redis with Global Datastore replication. Writes occur centrally and are asynchronously replicated to all regions, allowing the regional Lambdas to query Redis locally with sub-millisecond latency.

Automated Multi-Environment Rollouts

Infrastructure and application code changes progress strictly from DEV, to STAGING, to PROD. GitHub Actions orchestrates the build and deployment of the serverless functions to all regions simultaneously per environment. Security is maintained by using OpenID Connect (OIDC) for AWS authentication instead of static, long-lived credentials.