QuestionQ21

VerifiedDesign High-Performing Architectures

A social media company runs its application on Amazon EC2 instances behind an Application Load Balancer (ALB). The ALB is the origin for an Amazon CloudFront distribution. The application has more than a billion images stored in an Amazon S3 bucket and processes thousands of images each second. The company wants to resize the images dynamically and deliver appropriate formats to clients.

Which solution will meet these requirements with the LEAST operational overhead?

Explanation

Lambda@Edge is the only listed CloudFront feature that can execute custom logic at edge locations to transform requests or responses, which makes it suitable for dynamic image resizing and selecting an appropriate image format based on request characteristics. AWS documentation describes using Lambda@Edge for request customization and AWS guidance specifically shows image resizing with CloudFront and Lambda@Edge. By contrast, an origin request policy only controls which headers, cookies, and query strings CloudFront forwards to the origin, and a response headers policy only adds or removes HTTP headers in responses; neither policy performs image processing.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!