AWS Certified Developer Associate · Free Practice Question Medium
Question 35
A startup is developing a prototype for a news aggregator application. This application will display the latest news for a specific industry and provide a RESTful API endpoint that clients can invoke. Where feasible, the application should leverage AWS's caching features to reduce the load on the backend service. The backend of the application is expected to handle a modest amount of traffic, primarily during testing periods.
Which method would be the most cost-effective for the developer to implement this REST endpoint?
-
A
Utilize AWS API Gateway with an AWS Lambda function as the backend and enable caching in API Gateway.
-
B
Construct an Amazon ECS service for the application, using Amazon ElastiCache for caching.
-
C
Deploy an AWS Elastic Beanstalk application and use Amazon DynamoDB for caching services.
-
D
Launch an Amazon EC2 instance, host the application on it, and employ Amazon ElastiCache for caching purposes.
Reveal correct answer
Correct answer: A
Explanation
AWS API Gateway, combined with AWS Lambda, offers a serverless solution where costs are directly related to usage. API Gateway also provides a caching feature which can help reduce the load on the backend.
CORRECT: "Utilize AWS API Gateway with an AWS Lambda function as the backend and enable caching in API Gateway" is the correct answer (as explained above.)
INCORRECT: "Launch an Amazon EC2 instance, host the application on it, and employ Amazon ElastiCache for caching purposes" is incorrect.
Using an Amazon EC2 instance would incur constant costs, regardless of whether the instance is in use or idle. Additionally, employing AWS ElastiCache could increase the costs unnecessarily, especially for a prototype application.
INCORRECT: "Construct an Amazon ECS service for the application, using Amazon ElastiCache for caching" is incorrect.
Amazon ECS is overkill for a simple prototype application like this. It requires more resources and management than a serverless solution.
INCORRECT: "Deploy an AWS Elastic Beanstalk application and use Amazon DynamoDB for caching services" is incorrect.
While AWS Elastic Beanstalk simplifies application deployment, it does not inherently provide caching capabilities. Amazon DynamoDB is a database service, not a caching service, making it unsuitable for this requirement.
References:
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-caching.html
Save time with our AWS cheat sheets:
Discussion
Think the marked answer is wrong, or have a better explanation? Share it below — comments appear after review.
