What AWS service should be used to accomplish this?
Amazon DynamoDB
Amazon EC2
AWS Lambda
Amazon RDS
Explanations:
Amazon DynamoDB is a fully managed NoSQL database service that provides single-digit millisecond latency for read and write operations. It is designed for high availability and scalability, making it ideal for indexing and retrieving metadata for large files stored in Amazon S3. It can efficiently handle the queries necessary for metadata retrieval, allowing the web application to provide fast access to file information.
Amazon EC2 is a compute service that provides virtual servers in the cloud. While it can host applications that interact with S3, it does not inherently provide indexing or low-latency retrieval of metadata. It requires additional management and configuration for data storage and retrieval, which is less efficient for this specific use case.
AWS Lambda is a serverless compute service that runs code in response to events. While it can be used to process data from S3 and interact with other services, it does not serve as a dedicated database or indexing solution for fast metadata retrieval. It is more suited for short-lived tasks rather than persistent storage and retrieval of indexed data.
Amazon RDS is a managed relational database service that is suitable for applications requiring structured data storage and complex querying. However, it generally has higher latency compared to DynamoDB and may not be optimized for the specific requirement of single-digit millisecond latency for metadata retrieval, especially at scale.