Q36 — AWS SAA-C03 Ch.11
Question 36 of 100 | ← Chapter 11
Q736. A company uses Amazon API Gateway to manage its REST APIs that third-party service providers access. The company must protect the REST APIs from SQL injection and cross-site scripting attacks.What is the MOST operationally efficient solution that meets these requirements?
- A. Configure AWS Shield.
- B. Configure AWS WAF. ✓
- C. Set up API Gateway with an Amazon CloudFront distribution. Configure AWS Shield in CloudFront.
- D. Set up API Gateway with an Amazon CloudFront distribution. Configure AWS WAF in CloudFront.
Correct Answer: B. Configure AWS WAF.
Explanation
To protect the REST APIs from SQL injection and cross-site scripting attacks using Amazon API Gateway, the most operationally efficient solution is to configure AWS WAF.- AWS WAF (Web Application Firewall): AWS WAF helps protect web applications from common web exploits and attacks, including SQL injection and cross-site scripting (XSS). It allows you to define rules to filter and block malicious requests before they reach your application.By configuring AWS WAF for your REST APIs in Amazon API Gateway, you can apply web application firewall rules to detect and block requests that match known attack patterns. This provides an additional layer of security to protect against SQL injection and cross-site scripting attacks.This solution is operationally efficient because AWS WAF integrates seamlessly with API Gateway, allowing you to configure and manage the web application firewall rules within the same AWS environment. It provides a centralized solution for protecting your APIs from common web-based attacks, minimizing the operational effort required to maintain security.Option A (Configure AWS Shield) is not the most efficient solution for protecting against SQL injection and cross-site scripting attacks in this context. AWS Shield is primarily focused on DDoS (Distributed Denial of Service) protection and does not specifically address application-layer attacks.Option C (Set up API Gateway with an Amazon CloudFront distribution and configure AWS Shield in CloudFront) is also not the most operationally efficient solution as AWS Shield is not designed to protect against SQL injection and cross-site scripting attacks.Option D (Set up API Gateway with an Amazon CloudFront distribution and configure AWS WAF in CloudFront) is not the most efficient solution as it involves configuring AWS WAF in CloudFront, which adds complexity and may not provide the same level of integration and ease of management as configuring AWS WAF directly in API Gateway.Therefore, the correct answer is B: Configure AWS WAF. This solution provides an operationally efficient approach for protecting the REST APIs from SQL injection and cross-site scripting attacks within the context of Amazon API Gateway.