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. 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 is generally more complex and incurs higher costs compared to serverless options, especially for a low-traffic application. EKS requires management of Kubernetes clusters, which adds overhead and cost.
Using AWS Lambda with Amazon API Gateway is a cost-effective approach for a low-traffic application. Lambda’s pay-as-you-go pricing model allows for efficient resource usage, and API Gateway provides an easy way to expose REST endpoints. This solution also benefits from built-in caching features in API Gateway, reducing backend requests.
While using Amazon ECS for a container image can be an option, it is still more complex than using AWS Lambda. ECS requires management of container orchestration, which may lead to unnecessary costs and operational overhead for a simple application with minimal traffic. API Gateway can be used, but the overall setup would not be as cost-effective as Lambda.
Deploying a microservices application to AWS Elastic Beanstalk is more suitable for larger applications with higher traffic. It involves more management and resources than necessary for a proof of concept with low traffic. Additionally, using an Application Load Balancer adds extra costs, making this option less cost-effective.