
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
A company provides an API to its users that automates inquiries for tax computations based on item prices. The company experiences a larger number of inquiries during the holiday season only that cause slower response times. A solutions architect needs to design a solution that is scalable and elastic.
What should the solutions architect do to accomplish this?
A
Provide an API hosted on an Amazon EC2 instance. The EC2 instance performs the required computations when the API request is made.
B
Design a REST API using Amazon API Gateway that accepts the item names. API Gateway passes item names to AWS Lambda for tax computations.
C
Create an Application Load Balancer that has two Amazon EC2 instances behind it. The EC2 instances will compute the tax on the received item names.
D
Design a REST API using Amazon API Gateway that connects with an API hosted on an Amazon EC2 instance. API Gateway accepts and passes the item names to the EC2 instance for tax computations.
Explanation:
Correct Answer: B - Design a REST API using Amazon API Gateway that accepts the item names. API Gateway passes item names to AWS Lambda for tax computations.
Why this is the best solution:
Scalability and Elasticity: AWS Lambda provides automatic scaling without any manual intervention. During the holiday season when inquiries spike, Lambda will automatically scale to handle the increased load, and then scale down when demand decreases, optimizing costs.
Serverless Architecture: The combination of API Gateway and Lambda creates a fully serverless solution that:
Cost Optimization: With Lambda, you only pay for the compute time consumed during tax computations, which is ideal for seasonal workloads with unpredictable spikes.
Why the other options are not optimal:
Option A: Using only EC2 instances requires manual scaling and capacity planning. You would need to over-provision for peak seasons or implement complex auto-scaling, which is less efficient than serverless.
Option C: While an Application Load Balancer with EC2 instances provides some scalability, it still requires managing EC2 instances and implementing auto-scaling groups. This approach has higher operational overhead and may not scale as quickly as Lambda.
Option D: This combines API Gateway with EC2, which is better than pure EC2 but still requires managing EC2 scaling. The EC2 instances would need to be scaled up/down based on demand, which is less efficient than Lambda's automatic scaling.
Key AWS Services Used:
This solution provides the elasticity needed for seasonal spikes while minimizing operational overhead and optimizing costs.