Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AWS Certified Solutions Architect - Associate SAA-C03 topic 1 question 159 discussion

A company is running a publicly accessible serverless application that uses Amazon API Gateway and AWS Lambda. The application’s traffic recently spiked due to fraudulent requests from botnets.

Which steps should a solutions architect take to block requests from unauthorized users? (Choose two.)

  • A. Create a usage plan with an API key that is shared with genuine users only.
  • B. Integrate logic within the Lambda function to ignore the requests from fraudulent IP addresses.
  • C. Implement an AWS WAF rule to target malicious requests and trigger actions to filter them out.
  • D. Convert the existing public API to a private API. Update the DNS records to redirect users to the new API endpoint.
  • E. Create an IAM role for each user attempting to access the API. A user will assume the role when making the API call.
Show Suggested Answer Hide Answer
Suggested Answer: CD 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
jdr75
Highly Voted 1 year, 3 months ago
Selected Answer: CE
C) WAF has bot identification and remedial tools, so it's CORRECT. A) remember the question : "...block requests from unauthorized users?" -- an api key is involved in a authorization process. It's not the more secure process, but it's better than an totoally anonymous process. If you don't know the key, you can't authenticate. So the bots, at least the first days/weeks could not access the service (at the end they'll do, cos' the key will be spread informally). So it's CORRECT. B) Implement a logic in the Lambda to detect fraudulent ip's is almost impossible, cos' it's a dynamic and changing pattern that you cannot handle easily. D) creating a rol is not going to imply be more protected from unauth. request, because a rol is a "principal", it's not involved in the authorization process.
upvoted 8 times
debasishdtta
5 months, 3 weeks ago
Don't use API keys for authentication or authorization to control access to your APIs. If you have multiple APIs in a usage plan, a user with a valid API key for one API in that usage plan can access all APIs in that usage plan. Instead, to control access to your API, use an IAM role, a Lambda authorizer, or an Amazon Cognito user pool.
upvoted 1 times
...
pentium75
6 months, 1 week ago
E "An IAM role for EACH (!) user ATTEMPTING (!) to access the API"? Hello no.
upvoted 3 times
...
...
diddy99
Most Recent 1 week, 5 days ago
Selected Answer: AC
C) Everyone agrees on C B) Almost impossible cos how do you detect fraudulent IP address from a publicly accessible application D) It's a publicly accessible application, converting the API to a private one defeats the purpose E) IAM role for each user trying to access a publicly accessible API is impossible. It like creating an IAM for each user that tries to use google AUTH for their website A) By implementing API keys and usage plans, you can restrict access to your API to only those users who possess the key, helping to limit fraudulent access.
upvoted 1 times
...
dragongoseki
2 weeks ago
Selected Answer: AC
AC is right answer.
upvoted 1 times
...
ChymKuBoy
2 weeks, 1 day ago
Selected Answer: AC
AC for sure
upvoted 1 times
...
hb0011
1 month, 1 week ago
Do the people voting E realize how insane that is? Creating a local IAM user in your account for every user that needs to access the API. No just... no.
upvoted 1 times
...
EMPERBACH
2 months, 2 weeks ago
Selected Answer: BC
B. Integrate logic within the Lambda function to ignore the requests from fraudulent IP addresses. -> you can think about CORS script write on Lambda to prevent fraudulent IP addresses. C. Implement an AWS WAF rule to target malicious requests and trigger actions to filter them out. -> No comment here as it can use to filter traffic
upvoted 1 times
...
MrPCarrot
5 months, 1 week ago
C and D are the perfect answers
upvoted 2 times
...
debasishdtta
5 months, 3 weeks ago
Don't use API keys for authentication or authorization to control access to your APIs. If you have multiple APIs in a usage plan, a user with a valid API key for one API in that usage plan can access all APIs in that usage plan. Instead, to control access to your API, use an IAM role, a Lambda authorizer, or an Amazon Cognito user pool.
upvoted 1 times
...
awsgeek75
6 months, 1 week ago
Selected Answer: CD
I'll throw a curveball over here. "C" is a given as WAF rules can target malicious usage. For example: https://docs.aws.amazon.com/whitepapers/latest/aws-best-practices-ddos-resiliency/aws-waf-ip-reputation.html "D" Convert existing public API to a private API. This part is same as A. The additional bit over here is to change the DNS record to a new API endpoint which blocks the requests from unauthorised users also. The unauthorised users will not be redirected from public to private API endpoint. I am assuming that the public API endpoint will be used for authorisation and only authorised users will be redirected to private endpoint. This is more robust as the actual API (private endpoint) never gets hit with requests from unauthorised bots and WAF redirects it back to public URL. Happy to be corrected and challenged
upvoted 4 times
sidharthwader
4 months ago
It's a globally published API if you make it private how do other people access it ? A would be the better solution than D
upvoted 1 times
...
...
ale_brd_
6 months, 3 weeks ago
Selected Answer: AC
The combination of using an API key and implementing an AWS WAF rule provides the most comprehensive and effective way to block requests from unauthorized users and protect the company's serverless application from botnet attacks.
upvoted 3 times
...
MiniYang
7 months, 1 week ago
Selected Answer: CE
A. Create plans using API keys shared only with real users: While using API keys is a standard way to control access to APIs, using API keys alone may not completely prevent attacks from botnets. Malicious request. B. Incorporate logic in the Lambda function to ignore requests from fraudulent IP addresses: This may be a solution, but filtering that relies more on IP addresses may not be as flexible as using AWS WAF. D. Convert an existing public API to a private API. Update DNS records to redirect users to the new API endpoint: This approach makes the API private, but requires user redirects and may inconvenience existing users.
upvoted 1 times
...
Ruffyit
7 months, 1 week ago
C) WAF has bot identification and remedial tools, so it's CORRECT. A) remember the question : "...block requests from unauthorized users?" -- an api key is involved in a authorization process. It's not the more secure process, but it's better than an totoally anonymous process. If you don't know the key, you can't authenticate. So the bots, at least the first days/weeks could not access the service (at the end they'll do, cos' the key will be spread informally). So it's CORRECT.
upvoted 1 times
...
awashenko
8 months, 3 weeks ago
Selected Answer: AC
Agree A and C I don't see how E is feasible as its a public API. How would you create an IAM role for each user?
upvoted 4 times
...
TariqKipkemei
10 months ago
Selected Answer: AC
AWS WAF rule to target and filter out malicious requests and API key to authorize users.
upvoted 1 times
...
Guru4Cloud
10 months, 3 weeks ago
Selected Answer: AC
The reasons are: An API key with a usage plan limits access to only authorized apps and users. This prevents general public access. WAF rules can identify and block malicious bot traffic through pattern matching and IP reputation lists. Together, the API key and WAF provide preventative and detective controls against unauthorized requests. The other options add complexity or are reactive. IAM roles per user is not feasible for a public API. Ignoring requests in Lambda and changing DNS are response actions after an attack.
upvoted 2 times
...
zjcorpuz
11 months, 2 weeks ago
AC it's essential to note that while API keys are commonly associated with private APIs, they can also be used in conjunction with public APIs. In some cases, even public APIs may require API keys to control usage and monitor how the API is being utilized. The API provider might enforce usage limits, track API usage, or monitor for potential misuse, all of which can be managed effectively using API keys. In summary, API keys are not exclusive to private APIs and can be used for both private and public APIs, depending on the specific requirements and use case of the API provider.
upvoted 1 times
...
MutiverseAgent
11 months, 3 weeks ago
Selected Answer: AC
Why option C) vs option E) - It's simpler - We want to protect general access to the API and not granular method/user access. The API is already public so If a user API key is in several usage plans that is not a problem (The API is currently public). The objective is to protect API from abuse from malicious internet users and to NOT protect granular method/user access from users that are using the API in the correct way.
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in