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 OpenSearch Service.
Explanations:
Amazon DynamoDB is not designed for storing large objects like photos, especially with a limit of 20 MB per photo. While DAX can cache frequently accessed items, it does not solve the fundamental issue of storing large binary files efficiently. This solution would incur higher costs due to DynamoDB’s pricing structure for large item storage and read/write operations.
Storing photos in the Amazon S3 Intelligent-Tiering storage class is cost-effective for varying access patterns. It automatically moves objects between two access tiers when access patterns change, ensuring lower costs for infrequently accessed photos. Using DynamoDB for metadata allows for efficient lookups without incurring high costs from extensive data storage in DynamoDB itself.
While this option utilizes S3 Standard storage class and includes a lifecycle policy to transition older photos to S3 Standard-IA, the transition to Standard-IA is not as optimized as Intelligent-Tiering for varying access patterns. Additionally, the S3 Standard class may incur higher costs compared to Intelligent-Tiering for photos that do not receive frequent access.
S3 Glacier and Glacier Deep Archive are not suitable for the primary storage of photos that need to be accessed frequently, as they are designed for archival storage with retrieval times that can take hours. This would severely impact the user experience. While OpenSearch can handle metadata, the overall solution would be cost-inefficient and slow for a photo hosting service.