DVA-C02 · Question #635
A company needs to develop a proof of concept for a web service application. The application will show the weather forecast for one of the company's office locations. The application will provide a…
The correct answer is B. Create an AWS Lambda function by using AWS SAM. Expose the Lambda functionality by using. For a low-traffic proof-of-concept REST endpoint with caching, Lambda with API Gateway is most cost-effective because you pay only per invocation with no idle infrastructure costs.
Question
A company needs to develop a proof of concept for a web service application. The application will show the weather forecast for one of the company's office locations. The application will provide a REST endpoint that clients can call. Where possible, the application should use caching features provided by AWS to limit the number of requests to the backend service. The application backend will receive a small amount of traffic only during testing. Which approach should the developer take to provide the REST endpoint MOST cost-effectively?
Options
- ACreate a container image. Deploy the container image by using Amazon EKS. Expose the
- BCreate an AWS Lambda function by using AWS SAM. Expose the Lambda functionality by using
- CCreate a container image. Deploy the container image by using Amazon ECS. Expose the
- DCreate a microservices application. Deploy the application to AWS Elastic Beanstalk. Expose the
How the community answered
(55 responses)- A2% (1)
- B84% (46)
- C4% (2)
- D11% (6)
Why each option
For a low-traffic proof-of-concept REST endpoint with caching, Lambda with API Gateway is most cost-effective because you pay only per invocation with no idle infrastructure costs.
Amazon EKS requires persistent worker nodes with continuous compute costs, which is expensive and over-engineered for a low-traffic proof of concept.
AWS SAM simplifies Lambda and API Gateway deployment, and API Gateway has built-in response caching that limits backend invocations; with minimal traffic, Lambda's pay-per-invocation pricing means near-zero cost during idle periods, making it far cheaper than always-running containers or instances.
Amazon ECS with containers requires persistent task or EC2 instances running continuously, incurring idle costs even when there is no traffic.
Elastic Beanstalk provisions always-running EC2 instances that generate continuous costs regardless of traffic volume, making it significantly more expensive than serverless for low-traffic workloads.
Concept tested: Serverless cost optimization with Lambda and API Gateway caching
Source: https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
Community Discussion
No community discussion yet for this question.