A global e-commerce company wants to improve the performance and availability of its web application for users worldwide. The application serves static content (images, JavaScript, CSS) and dynamic content (API responses). The company needs to minimize latency and protect against DDoS attacks. Which combination of AWS services should be used?
- AAmazon Route 53 for DNS, Amazon S3 for all content, and AWS Shield Standard for DDoS protection
- BAmazon S3 for static content, Application Load Balancer for dynamic content
- CAmazon CloudFront with S3 for static content and an Application Load Balancer in front of EC2 instances for dynamic content
- DAmazon CloudFront with S3 for static content and an EC2 Auto Scaling group for dynamic content
Show answer & explanationAnswer & explanation
Correct answer: C. Amazon CloudFront with S3 for static content and an Application Load Balancer in front of EC2 instances for dynamic content
Amazon CloudFront is a global CDN that caches static content (from S3) at edge locations, reducing latency. It also integrates with AWS WAF and Shield for DDoS protection. For dynamic content, CloudFront can forward requests to an Application Load Balancer, which distributes traffic to an Auto Scaling group of EC2 instances, ensuring high availability and scalability for API responses.
Why the other options are wrong
- A. While Route 53 and S3 are involved, S3 is not suitable for dynamic content, and Shield Standard is basic; CloudFront offers more advanced DDoS protection and performance benefits.
- B. This setup lacks a CDN for global performance and DDoS protection.
- D. This is a good start but doesn't explicitly mention an ALB for dynamic content, which is crucial for distributing traffic to an Auto Scaling group efficiently and providing Layer 7 features.
CloudFront for Global Apps
Amazon CloudFront is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency and high transfer speeds. It integrates with S3, EC2, ELB, and WAF/Shield.
- Caches static content at edge locations worldwide.
- Can serve dynamic content by forwarding requests to origins (e.g., ALBs, EC2).
- Provides built-in DDoS protection and integrates with AWS WAF.
- Improves user experience by reducing latency and increasing availability.
Memory trick: CloudFront's Edge: Speed and Shield for All.