A company hosts a static website in Amazon S3 and wants to add a contact form with server-side components for name, email, phone, and message. The site expects fewer than 100 visits per month. The contact form must email the company when a user submits it. Which solution is MOST cost-effective?
Choose an answer
Tap an option to check your answer.
Correct answer: 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..
Why this is the answer
The most cost-effective solution for a low-traffic contact form is using AWS Lambda and API Gateway. API Gateway can expose an endpoint that triggers a Lambda function to serve the contact form. When a user submits the form, another Lambda function, also triggered by API Gateway, can process the data and publish it to an Amazon SNS topic. SNS can then send an email notification. This serverless approach is highly cost-effective for low usage because you only pay for actual invocations, avoiding idle resource costs. Hosting in Amazon ECS would incur continuous costs for container instances, even with low traffic. AWS Amplify Hosting is good for static and dynamic content, but using SQS for email delivery isn't direct; SNS is better for fan-out to email. Migrating to EC2 instances running Windows Server is significantly more expensive due to continuous instance costs and the overhead of managing a server, especially for a simple contact form.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed