AWS Certified Solutions Architect – Associate (SAA-C03) — Question 388
A financial company hosts a web application on AWS. The application uses an Amazon API Gateway Regional API endpoint to give users the ability to retrieve current stock prices. The company’s security team has noticed an increase in the number of API requests. The security team is concerned that HTTP flood attacks might take the application offline.
A solutions architect must design a solution to protect the application from this type of attack.
Which solution meets these requirements with the LEAST operational overhead?
Answer options
- A. Create an Amazon CloudFront distribution in front of the API Gateway Regional API endpoint with a maximum TTL of 24 hours.
- B. Create a Regional AWS WAF web ACL with a rate-based rule. Associate the web ACL with the API Gateway stage.
- C. Use Amazon CloudWatch metrics to monitor the Count metric and alert the security team when the predefined rate is reached.
- D. Create an Amazon CloudFront distribution with Lambda@Edge in front of the API Gateway Regional API endpoint. Create an AWS Lambda function to block requests from IP addresses that exceed the predefined rate.
Correct answer: B
Explanation
AWS WAF natively integrates with Amazon API Gateway, allowing administrators to deploy rate-based rules that automatically block offending IP addresses with minimal configuration and zero code maintenance. Other options, such as using Lambda@Edge, introduce significant operational overhead through custom code development and management. CloudWatch metrics only provide reactive alerting rather than active mitigation, and modifying CloudFront TTLs does not stop flood attacks and is inappropriate for real-time financial data.