Question: Your web application is getting a suspicious amount of bad requests from foreign IP addresses. Your business is operating in only a few countries and you would like to block any other traffic. What is the best practice for limiting access to your web application by country?
- Use Web Application Firewall and create a geo match condition to drop all requests from countries that aren't on your allow list.
- Use Application Load Balancer to create a new routing rule that looks at source IP address. Add an IP block for the countries that have access.
- Host the front end of your website in CloudFront and configure a geo restriction on the distribution.
- Use CloudTrail to monitor the IP addresses of the bad requests. Use Lambda to add these IP addresses to an Application Load Balancer rule that blocks the IPs.
Answer: The correct answer of the above question is Option A:Use Web Application Firewall and create a geo match condition to drop all requests from countries that aren't on your allow list.