Skip to content

Backend Documentation

goldy4719 edited this page Apr 10, 2026 · 6 revisions

Overview

This service provides a REST API for managing user-uploaded images. Metadata is stored in DynamoDB, while image files are stored in S3. The API generates presigned URLs to allow secure, temporary access to images.

Prerequisites

  • AWS Lambda function -DynamoDB table:
    • Partition key: userId
    • Sort key: imageId
  • S3 bucket for image storage
  • API Gateway with JWT authorizer
  • IAM permissions for DynamoDB and S3 operations

Implementation / Steps

  1. API Gateway forwards requests to Lambda.
  2. Authentication middleware extracts the user ID from the JWT.
  3. Exception middleware standardizes all error responses.
  4. Route handlers process requests using DynamoDB and S3.
  5. Presigned URLs are generated when image access is required.

Key Takeaways

  • Metadata and file storage are separated (DynamoDB vs S3).
  • All endpoints require authentication.
  • Presigned URLs prevent direct public access to S3.

Core Image API Endpoints

Clone this wiki locally