Intermediate LevelCloud Computing (AWS/GCP/Azure)
What is Amazon OpenSearch Service and when is it used for log analytics and vector search?
❓ Interview Prompt: Explain Amazon OpenSearch Service (formerly Amazon Elasticsearch Service), index sharding, OpenSearch Dashboards, and k-NN vector search.
Amazon OpenSearch Service is a fully-managed suite for real-time search, log analytics, and vector database operations (forked from open-source Elasticsearch/Kibana).
Core Use Cases:
1
Log Analytics (ELK Stack replacement): Ingests application logs via Fluent Bit / Logstash, allowing real-time searching and visualization in OpenSearch Dashboards.
2
Full-Text Search Engine: Executes inverted index keyword search with fuzzy matching and autocomplete.
3
Vector Search (k-NN): Indexes high-dimensional vector embeddings for AI semantic search applications.
Code Implementation Example
typescript
import { Client } from '@opensearch-project/opensearch';
const client = new Client({ node: 'https://search-domain.us-east-1.es.amazonaws.com' });
// Querying OpenSearch index for application error logs
async function searchErrorLogs() {
const response = await client.search({
index: 'app-logs-*',
body: {
query: {
match: { log_level: 'ERROR' }
}
}
});
return response.body.hits.hits;
}💡Searching error logs in Amazon OpenSearch Service using JavaScript client.
🎯 Interview Key Takeaway
Amazon OpenSearch Service manages distributed full-text search, real-time log analytics, and k-NN vector search indexes.
#OpenSearch#Elasticsearch#Log Analytics#Vector Search#Intermediate
Back to all Cloud Computing (AWS/GCP/Azure) Questions→