Question #1304
A company hosts its static website on Amazon S3. They want to add a feedback form that requires server-side processing to store user responses. The form will collect user ratings and comments. The company anticipates fewer than 100 submissions per month. Which solution meets these requirements MOST cost-effectively?
Host the feedback form on Amazon ECS. Use Amazon RDS to store the responses and Amazon SNS to notify administrators.
Create an Amazon API Gateway endpoint with an AWS Lambda backend that stores the data in Amazon DynamoDB.
Convert the website to Amazon Lightsail, implement client-side scripting for the form, and use Amazon Redshift for storage.
Deploy a t2.micro Amazon EC2 instance with a LAMP stack to host the form. Use client-side scripting and Amazon RDS for storage.
Explanation
The correct answer is B. Here's why:
- Cost-Effectiveness: API Gateway and Lambda follow a pay-per-request pricing model, with no charges when idle. DynamoDB’s free tier and low storage/throughput costs suit infrequent submissions (100/month).
- Serverless Architecture: Eliminates the need for always-on infrastructure (e.g., EC2, ECS, RDS), reducing operational costs and maintenance.
- Scalability: Automatically handles traffic spikes without manual intervention.
Why other options are incorrect:
- A: ECS and RDS require constant provisioning, incurring higher costs for low usage.
- C: Client-side scripting cannot process server-side logic, and Redshift is overkill for simple data storage.
- D: EC2 and RDS involve ongoing costs for idle resources and operational overhead.
Key Points:
- Use serverless services (Lambda, API Gateway, DynamoDB) for sporadic, low-volume workloads.
- Avoid always-on infrastructure (EC2, ECS, RDS) when serverless alternatives exist.
- Client-side scripting cannot replace server-side processing.
Answer
The correct answer is: B