DAS-C01 · Question #37
A company is currently using Amazon DynamoDB as the database for a user support application. The company is developing a new version of the application that will store a PDF file for each support…
The correct answer is B. Store the file in Amazon S3 and the object key as an attribute in the DynamoDB table. Amazon S3 is purpose-built for storing large binary objects (files, PDFs, images) cost-effectively at any scale, with pay-per-GB-stored pricing. The correct pattern is to store the PDF in S3 and save only the S3 object key (a small string) as an attribute in the DynamoDB item…
Question
A company is currently using Amazon DynamoDB as the database for a user support application. The company is developing a new version of the application that will store a PDF file for each support case ?0 MB. The file should be retrievable whenever the case is accessed in the ranging in size from 1 application. How can the company store the file in the MOST cost-effective manner?
Options
- AStore the file in Amazon DocumentDB and the document ID as an attribute in the DynamoDB
- BStore the file in Amazon S3 and the object key as an attribute in the DynamoDB table.
- CSplit the file into smaller parts and store the parts as multiple items in a separate DynamoDB
- DStore the file as an attribute in the DynamoDB table using Base64 encoding.
How the community answered
(60 responses)- A5% (3)
- B80% (48)
- C12% (7)
- D3% (2)
Explanation
Amazon S3 is purpose-built for storing large binary objects (files, PDFs, images) cost-effectively at any scale, with pay-per-GB-stored pricing. The correct pattern is to store the PDF in S3 and save only the S3 object key (a small string) as an attribute in the DynamoDB item, allowing retrieval by looking up the key and fetching the object. DynamoDB has a hard 400 KB item size limit, making Option D (Base64 encoding in DynamoDB) impossible for multi-MB files. Option C (splitting into DynamoDB items) is complex, expensive, and fights against DynamoDB's design. Option A (Amazon DocumentDB) is a document database, not a cost-effective object store for binary files.
Topics
Community Discussion
No community discussion yet for this question.