SAA-C03 Question 100
Single answerA company wants to expose a RESTful API to its customers for accessing real-time inventory data. The API needs to be scalable, secure, and cost-efficient. Additionally, the company wants to control which users can access specific API methods and log all API requests for auditing purposes. Which AWS service combination would best meet these requirements?
- A
Amazon API Gateway and AWS Lambda
- B
Amazon API Gateway and Amazon RDS
- C
Amazon EC2 with a custom REST API and Amazon CloudWatch
- D
Amazon API Gateway, AWS Lambda, and AWS IAM
Show answer and explanation
Correct answer: D
Explanation
Amazon API Gateway is designed to expose REST APIs in a scalable and cost-efficient manner. Combined with AWS Lambda, it allows you to handle backend logic without provisioning servers. AWS IAM enables fine-grained access control for API methods, ensuring security. API Gateway also integrates with CloudWatch for logging and monitoring, meeting all the requirements of scalability, security, and auditing.
- A. Incorrect.
This option provides scalability and cost-efficiency through API Gateway and Lambda. However, it does not address user access control or logging requirements directly.
- B. Incorrect.
While API Gateway can provide REST API functionality, using Amazon RDS does not inherently address scalability or user access control at the API level.
- C. Incorrect.
Using EC2 with a custom REST API requires significant effort to manage scalability, security, and cost-efficiency. Additionally, managing access control and logging would require additional configuration and services.
- D. Correct.
This is the correct answer. Amazon API Gateway provides a scalable and cost-efficient way to expose REST APIs, AWS Lambda enables running backend logic without managing servers, and AWS IAM can be used for fine-grained access control to the API methods. API Gateway also integrates with CloudWatch for logging and monitoring.