View a markdown version of this page

ECS Architecture - Dynamic Image Transformation for Amazon CloudFront

ECS Architecture

This high-performance container-based architecture supports images up to 100 MB and includes all advanced v8.0.0 features including transformation policies, non-S3 origin support, and administrative interface.

ECS architecture for high-performance image processing

serverless image handler alb ecs architecture

The high-level process flow for the ECS architecture is as follows:

  1. An Amazon CloudFront distribution provides global caching and content delivery.

  2. An Application Load Balancer (ALB) distributes incoming requests across multiple ECS tasks for high availability and scalability.

  3. Amazon Elastic Container Service (ECS) tasks running on AWS Fargate process image transformation requests using containerized applications.

  4. ECS tasks maintain in-memory caches of transformation policies and origin mappings for fast request resolution and reduced latency.

  5. Images are retrieved from multiple origin types: Amazon S3 buckets or external HTTP-accessible domains based on configured origin mappings.

  6. An administrative interface built with AWS Amplify provides policy and origin management capabilities through a secure web interface.

  7. Amazon DynamoDB stores transformation policies, origin configurations, and mapping rules with high availability and performance.

  8. Amazon Cognito provides authentication and authorization for the administrative interface.

  9. (Optional) Amazon Rekognition integration for smart cropping and content moderation features.