AWS Certified Solutions Architect – Professional — Question 863
A company needs to cost-effectively persist small data records (up to 1 KiB) for up to 30 days. The data is read rarely. When reading the data, a 5-minute delay is acceptable.
Which of the following solutions achieve this goal? (Choose two.)
Answer options
- A. Use Amazon S3 to collect multiple records in one S3 object. Use a lifecycle configuration to move data to Amazon Glacier immediately after write. Use expedited retrievals when reading the data.
- B. Write the records to Amazon Kinesis Data Firehose and configure Kinesis Data Firehose to deliver the data to Amazon S3 after 5 minutes. Set an expiration action at 30 days on the S3 bucket.
- C. Use an AWS Lambda function invoked via Amazon API Gateway to collect data for 5 minutes. Write data to Amazon S3 just before the Lambda execution stops.
- D. Write the records to Amazon DynamoDB configured with a Time To Live (TTL) of 30 days. Read data using the GetItem or BatchGetItem call.
- E. Write the records to an Amazon ElastiCache for Redis. Configure the Redis append-only file (AOF) persistence logs to write to Amazon S3. Recover from the log if the ElastiCache instance has failed.
Correct answer: B, D
Explanation
Amazon Kinesis Data Firehose (Option B) can buffer incoming data for up to 5 minutes before delivering it to Amazon S3, where an S3 Lifecycle policy can automatically delete the objects after 30 days to keep costs low. Amazon DynamoDB (Option D) is also ideal and highly cost-effective for small 1 KiB records, allowing cheap, direct reads via GetItem and automatic, free deletion after 30 days using Time To Live (TTL). Other options are either architecturally inappropriate, such as holding API Gateway connections open for 5 minutes (Option C), or unnecessarily complex and expensive (Options A and E).