Project banner

Beadword

AWS Lambda Step Functions DynamoDB S3 CloudFront Route 53 SQS EventBridge CloudWatch SNS SES Terraform Serverless IaC Event-driven architecture

Project Description

Beadword is a daily word puzzle application , offering users an engaging online challenge to find keywords among scrambled letters to solve a main word. The project is implemented on the AWS platform to ensure a scalable and stable gaming experience

Main Goal

The primary goal of the Beadword project is to provide a stable and engaging daily word puzzle experience to users, utilizing the AWS cloud platform to ensure high availability, scalability, and performance of the application. The system is designed to autonomously generate a steady supply of new puzzles and efficiently serve them to players globally.

Architecture & Technical Solution

The following diagram illustrates the key components and their interaction within the Beadword project.

Project architecture diagram

Frontend

The application's static assets are hosted in an Amazon S3 bucket. These assets are distributed globally via Amazon CloudFront, which serves as a Content Delivery Network (CDN) to ensure low-latency access for users worldwide.

Amazon Route 53 manages DNS records, routing the custom domain to the CloudFront distribution. AWS Certificate Manager (ACM) provides and maintains the SSL/TLS certificate, enabling secure HTTPS communication.

Puzzle Data Serving

  • Client requests for the daily puzzle are routed through Amazon API Gateway.
  • API Gateway triggers an AWS Lambda function, which retrieves the current day’s puzzle from an Amazon DynamoDB table.
  • For GET requests, CloudFront caches the response until the start of the next day, significantly reducing backend load.

Puzzle Validation

  • After solving the puzzle, the client submits the result via API Gateway.
  • A dedicated AWS Lambda function validates the answer against the correct value stored in DynamoDB.
  • Upon a correct solution, the API returns the player’s performance metrics.

Automated Puzzle Generation

  • A scheduled EventBridge rule triggers an AWS Step Functions workflow responsible for batch puzzle generation.
  • The workflow ensures a continuous supply of puzzles by generating and storing them in DynamoDB.
  • A daily generation report is automatically delivered to administrators via Amazon SNS and Amazon SES
  • Configuration parameters and secrets are centrally managed through AWS Systems Manager Parameter Store (SSM).

Warm-up Strategy

A scheduled AWS Lambda function, triggered by EventBridge Scheduler, proactively invokes the API Gateway’s GET /puzzle endpoint.
This minimizes cold-start latency for daily puzzle retrieval and serves as a cost-efficient alternative to Provisioned Concurrency, given the expected traffic profile.

Deployment & Observability

Project architecture diagram

Amazon CloudWatch Logs and CloudWatch Dashboards provide centralized logging and metric aggregation.

CloudWatch Alarms are configured for critical metrics, triggering push notifications and email alerts to administrators through Amazon SNS and Amazon SES.

The entire infrastructure is defined, deployed, and maintained using Terraform, ensuring consistent, idempotent, and reproducible environments across all stages.