Skip to content

Infrastructure

Architecture Diagram

Plabs AI Server
      โ”‚
      โ”‚ HTTPS POST /api/v1/generation_logs
      โ–ผ
Amazon API Gateway
      โ”‚
      โ–ผ
AWS Lambda
(prompt-collection)
      โ”‚
      โ”œโ”€โ”€ PUT prompt.json
      โ”‚
      โ””โ”€โ”€ PUT image.jpg
            โ”‚
            โ–ผ
      Amazon S3

AWS Services Used

Service Purpose
Amazon API Gateway Provides the endpoint that receives HTTP requests from the Plabs server
AWS Lambda Processes requests and uploads JSON and images to S3
Amazon S3 Persistently stores prompt JSON and image files

Amazon API Gateway

Provides a public HTTPS endpoint that accepts requests from the Plabs AI server. Connected to Lambda as the backend via proxy integration.

AWS Lambda

Processes requests received from API Gateway. Key responsibilities:

  • Extracts JSON (prompt information) from the request body and saves it to S3
  • Saves image data included in the request as JPG to S3
  • Determines the storage path in {yyyy}/{mm}/{dd}/{log_id}/ format
  • Saves the received prompt JSON as-is

Amazon S3

Long-term storage for generated data. Folder structure:

s3://your-bucket/
โ””โ”€โ”€ {yyyy}/
    โ””โ”€โ”€ {mm}/
        โ””โ”€โ”€ {dd}/
            โ””โ”€โ”€ {log_id}/
                โ”œโ”€โ”€ prompt.json
                โ””โ”€โ”€ image.jpg
Path Element Description
{yyyy}/{mm}/{dd} Generation date (UTC)
{log_id} Unique identifier for the generation log
prompt.json JSON file containing generation parameters
image.jpg Generated avatar image