AWS Certified Developer – Associate — Question 65
A developer is designing a serverless application for an ecommerce website. An Amazon API Gateway API exposes AWS Lambda functions for billing, payment, and user operations. The website features shopping carts for the users. The shopping carts must be stored for extended periods of time and will be retrieved frequently by the front-end application.
The load on the application will vary significantly based on the time of day and the promotional sales that are offered on the website. The application must be able to scale automatically to meet these changing demands.
Which solution will meet these requirements?
Answer options
- A. Store the data objects on an Amazon RDS DB instance. Cache the data objects in memory by using Amazon ElastiCache.
- B. Store the data objects on Amazon EC2 instances behind an Application Load Balancer. Use session affinity (sticky sessions) for each user's shopping cart.
- C. Store the data objects in Amazon S3 buckets. Cache the data objects by using Amazon CloudFront with the maximum TTL.
- D. Store the data objects in Amazon DynamoDB tables. Cache the data objects by using DynamoDB Accelerator (DAX).
Correct answer: D
Explanation
The correct answer is D because Amazon DynamoDB is a fully managed NoSQL database that scales automatically, making it suitable for varied application loads, and DAX provides in-memory caching to speed up data access. Option A requires manual scaling and may not handle the variable load efficiently, option B involves managing EC2 instances which defeats the serverless aspect, and option C is not optimal for frequent dynamic access required for shopping carts.