Which solution provides the appropriate user access MOST cost-effectively?
Store the photos in Amazon DynamoDB. Turn on DynamoDB Accelerator (DAX) to cache frequently viewed items.
Store the photos in the Amazon S3 Intelligent-Tiering storage class. Store the photo metadata and its S3 location in DynamoDB.
Store the photos in the Amazon S3 Standard storage class. Set up an S3 Lifecycle policy to move photos older than 30 days to the S3 Standard-Infrequent Access (S3 Standard-IA) storage class. Use the object tags to keep track of metadata.
Store the photos in the Amazon S3 Glacier storage class. Set up an S3 Lifecycle policy to move photos older than 30 days to the S3 Glacier Deep Archive storage class. Store the photo metadata and its S3 location in Amazon Elasticsearch Service (Amazon ES).
Explanations:
Storing photos directly in DynamoDB is not cost-effective for large objects like photos (up to 20 MB). DynamoDB is designed for smaller items and has storage limitations. DAX is a caching service for DynamoDB, but it doesn’t solve the fundamental issue of storing large objects in DynamoDB.
Storing photos in S3 Intelligent-Tiering is the most cost-effective approach for varying access patterns. Intelligent-Tiering automatically moves objects between access tiers based on usage, optimizing costs. Storing metadata in DynamoDB allows for efficient querying and retrieval of photo information. This combination is the most suitable for the described use case.
While using S3 Standard and transitioning to S3 Standard-IA is a cost-saving measure, it requires manually deciding on a time frame (30 days). Intelligent-Tiering automates this process and can be more cost-effective if access patterns change frequently. Using object tags for metadata is also less efficient and scalable than using a dedicated database like DynamoDB.
S3 Glacier and S3 Glacier Deep Archive are for long-term archival and are not suitable for photos that need to be accessed relatively quickly. The retrieval times for Glacier are not acceptable for a photo hosting service. Using Elasticsearch for metadata storage is also overkill and more expensive than using DynamoDB for this purpose.