DEV Community

Emmanuel Akolbire
Emmanuel Akolbire

Posted on • Edited on

Project Translate : Architecture

Hey there, fellow developers! 👋

Today I'm excited to kick off a series about building Project Translate - a full-featured translation service that handles both text and file translations across multiple languages. The best part? It's built entirely on AWS serverless infrastructure, making it both scalable and cost-effective.

Throughout this series, I'll walk you through the entire journey of creating this REST API from scratch. Whether you're new to serverless or an experienced AWS developer, you'll find valuable insights into building production-ready services in the cloud.

Architecture

Project Translate's architecture

Let's break down the architecture that powers our serverless translation service. We'll explore how AWS services work together to handle both text and file translations efficiently.

API Gateway
Serves as the entry point for all REST API requests, handling request routing based on endpoint paths. It provides request validation and rate limiting.

Lambda Functions
The lambda functions process the requests and translate the files and text with AWS Translate.

S3 bucket and DynamoDB
The S3 bucket is used to store output files and the DynamoDB table is used to store input reqeust and output responses.A DynamoDB table is also used to throttle requests to the API

Request Flow

Let's walk through what happens when a translation request hits our API:

  1. Everything starts at the API Gateway, where the request first lands
  2. Based on the endpoint path, API Gateway routes the request to the appropriate Lambda function
  3. Before any translation happens, our Lambda:
  4. Validates the incoming request
  5. Checks if we're within throttling limits
  6. Ensures everything is good to go

  7. Here's where things get interesting. We handle two types of translations:

For Text Translation

  • Lambda sends text directly to AWS Translate
  • Stores results in DynamoDB
  • Returns translated text to the client

For File Translation

  • File comes in through API Gateway
  • Lambda kicks off the translation process
  • Stores the translated file in S3
  • Generates a pre-signed URL for secure access
  • Returns the URL to the client

This architecture gives us several advantages:

  • Scales automatically with demand
  • Pay only for what we use
  • No servers to maintain
  • Built-in high availability

In the next post, we'll dive into the actual implementation, starting with setting up our API Gateway and writing our first Lambda function. Stay tuned! 🚀

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more