AWS Certified Solutions Architect – Associate (SAA-C03) — Question 838
A company uses Amazon S3 to host its static website. The company wants to add a contact form to the webpage. The contact form will have dynamic server-side components for users to input their name, email address, phone number, and user message.
The company expects fewer than 100 site visits each month. The contact form must notify the company by email when a customer fills out the form.
Which solution will meet these requirements MOST cost-effectively?
Answer options
- A. Host the dynamic contact form in Amazon Elastic Container Service (Amazon ECS). Set up Amazon Simple Email Service (Amazon SES) to connect to a third-party email provider.
- B. Create an Amazon API Gateway endpoint that returns the contact form from an AWS Lambda function. Configure another Lambda function on the API Gateway to publish a message to an Amazon Simple Notification Service (Amazon SNS) topic.
- C. Host the website by using AWS Amplify Hosting for static content and dynamic content. Use server-side scripting to build the contact form. Configure Amazon Simple Queue Service (Amazon SQS) to deliver the message to the company.
- D. Migrate the website from Amazon S3 to Amazon EC2 instances that run Windows Server. Use Internet Information Services (IIS) for Windows Server to host the webpage. Use client-side scripting to build the contact form. Integrate the form with Amazon WorkMail.
Correct answer: B
Explanation
Option B is the most cost-effective solution because it utilizes serverless components (Amazon API Gateway, AWS Lambda, and Amazon SNS) that charge only per request, easily falling within the AWS Free Tier for under 100 monthly visits. Running containers continuously on Amazon ECS (Option A) or hosting on virtual machines via Amazon EC2 (Option D) incurs ongoing hourly costs regardless of traffic. Option C is less suitable because Amazon SQS is a queueing service that does not natively send email notifications like Amazon SNS does.