Which approach should the developer take to provide the REST endpoint MOST cost-effectively?
Create a container image. Deploy the container image by using Amazon Elastic Kubernetes Service (Amazon EKS). Expose the functionality by using Amazon API Gateway.
Create an AWS Lambda function by using the AWS Serverless Application Model (AWS SAM). Expose the Lambda functionality by using Amazon API Gateway.
Create a container image. Deploy the container image by using Amazon Elastic Container Service (Amazon ECS). Expose the functionality by using Amazon API Gateway.
Create a microservices application in a preferred programming language. Deploy the application to AWS Elastic Beanstalk. Expose the AWS Lambda functionality by using an Application Load Balancer.
Explanations:
Deploying a container image using Amazon EKS introduces additional complexity and cost due to managing Kubernetes infrastructure. This option is less cost-effective for a small amount of traffic and does not leverage serverless benefits that can minimize costs.
Creating an AWS Lambda function with AWS SAM and exposing it via Amazon API Gateway is the most cost-effective solution for low traffic. AWS Lambda allows for automatic scaling and only charges for the actual compute time used, while API Gateway provides a cost-effective way to create and manage REST APIs.
Using Amazon ECS to deploy a container image adds unnecessary complexity and costs compared to a serverless solution like AWS Lambda. ECS requires management of underlying infrastructure, which is not ideal for a simple proof of concept with minimal traffic.
Deploying an application to AWS Elastic Beanstalk requires more resources and management compared to a serverless architecture. Using an Application Load Balancer further adds costs, making this option less suitable for a low-traffic scenario.