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 |