
- OpenSearch Service is a distributed search system with options to separate master and data node responsibilities.
- Clusters can use dedicated master nodes (cluster coordination) with separate data nodes (indexing/search), and can be zoned across Availability Zones for fault tolerance.
- OpenSearch Service stores data on persistent volumes (EBS) attached to service nodes — it is not strictly ephemeral.
- OpenSearch Dashboards (the Kibana-compatible UI) is provided by the managed service.
- Note: The
Resourceelement must be inside the statement object for domain-level resource-based policies.
test-domain OpenSearch domain only from the 192.0.2.0/24 IP range.
Integrating IAM and OpenSearch
- Define IAM users, groups, and policies to control management APIs and to grant identities access.
- Attach IAM policies to identities that need access, and optionally attach resource-based policies on the domain for cross-account scenarios.
- Enable OpenSearch Fine-Grained Access Control to enforce index- and document-level permissions (local users, Amazon Cognito, and IAM identities supported).
- Network-level controls (VPC/subnets, security groups, NACLs) are evaluated before higher-level authorization and remain a primary barrier.

- Client issues a request (with IAM-signed request or other authentication).
- VPC and security group rules are enforced.
- IAM identity and credentials are validated.
- Resource-based and identity-based access policies are evaluated.
- If Fine-Grained Access Control is enabled, index/document-level permissions are applied, resulting in full/partial responses or denials.
- Use Fine-Grained Access Control to implement least-privilege at index and document granularity.
- Supported authentication methods: local (native) users, Amazon Cognito, and IAM-based access.
- Fine-grained controls augment, not replace, network isolation and IAM.
- Use VPC interface endpoints (AWS PrivateLink) to keep API traffic private between VPCs or across accounts when supported by the service.
- Gateway endpoints apply only to S3 and DynamoDB and are not relevant for OpenSearch endpoints.

- Node-to-node encryption: enable to protect intra-cluster traffic.
- In-transit encryption (front-end TLS): enable TLS (HTTPS on port 443) for client-to-cluster communications.
- Encryption at rest: enable KMS-managed keys (AES-256) for EBS volumes and stored snapshots.

- OpenSearch Security Analytics plugs into ingestion pipelines to detect anomalies and generate alerts.
- Detectors and rules inspect logs/metrics to find suspicious behavior and can send notifications (email, SNS, Slack, etc.).
- Available features depend on OpenSearch versions (certain capabilities require modern releases, e.g., 2.5+).

- Visualization via OpenSearch Dashboards.
- Detector-based anomaly detection for log streams.
- Integration with notification channels for automated workflows and incident response.
- Network isolation (VPC, subnets, security groups)
- Engine-level authentication and authorization
- Encryption (in-transit and at-rest)
- Control-plane auditing and logging (CloudTrail, AWS Config)
- Purpose-built for low-latency in-memory caching (supports Redis and Memcached).
- Primary-replica model: a single primary handles writes while replicas serve reads and provide failover.
- Redis Cluster (cluster mode enabled) enables automatic sharding/partitioning across multiple shards.
- Not peer-to-peer in the same way as distributed search engines: Redis typically uses master/replica unless sharding is enabled.

- Deploy ElastiCache clusters inside a VPC and use security groups and NACLs for network segmentation.
- Cross-VPC access is commonly achieved using VPC peering or AWS Transit Gateway. Note: ElastiCache does not offer VPC interface endpoints (PrivateLink).
- IAM governs management APIs (create/modify clusters), but IAM does not directly control Redis data-plane commands. For data-plane authentication use Redis AUTH.
ElastiCache does not support AWS PrivateLink interface endpoints. Cross-VPC connectivity should use VPC peering, Transit Gateway, or other network-level solutions.
- Use Redis AUTH (AUTH token) for client authentication to the Redis data plane.
- Enable in-transit encryption (TLS) to protect client-to-node and node-to-node traffic.
- Enable encryption at rest (KMS-managed keys) for snapshots and persisted data where supported.


- Redis slow log: captures commands that exceed a configured execution time threshold — useful to diagnose long-running operations.
- Engine logs: publish Redis engine logs (errors, evictions) to CloudWatch Logs for central retention and analysis.
- Events: ElastiCache emits lifecycle and configuration change events that can be delivered to Amazon SNS.
- Metrics: CloudWatch provides real-time metrics (CPU, memory, evictions, swap usage, replication lag).
- Control plane auditing: use AWS CloudTrail to capture management API calls and AWS Config for configuration drift and compliance checks.

- Route engine logs and slow logs to CloudWatch Logs for retention, search, and integration with analytics/alerting pipelines.
- Use CloudWatch alarms and SNS topics to notify operators when metrics cross thresholds (e.g., memory pressure, evictions).
- Integrate control-plane logs (CloudTrail) with SIEMs for operational security monitoring.


- ElastiCache provides a service updates feature to notify you about recommended engine upgrades and security patches.
- You can apply updates via the console, CLI, or API; schedule maintenance windows to minimize downtime.
- Track and enforce patching compliance with AWS Config, and automate notifications with CloudWatch and SNS.

- Use the ElastiCache console, CLI, or API to view required updates and choose apply dates.
- Schedule maintenance during low-traffic periods to limit customer impact.
- Automate compliance checks with AWS Config rules and CloudWatch alarms.
Combine network-level controls (VPC + security groups) with engine-level authentication (Redis AUTH) and encryption (TLS + KMS) to apply layered security for caching workloads.
- OpenSearch and OpenSearch Serverless: rely on network isolation, IAM/resource-based policies, fine-grained access control, PrivateLink for private connectivity, and KMS-backed encryption for data at rest and in transit. Use Security Analytics for anomaly detection.
- ElastiCache for Redis: design for low-latency caching with a primary/replica or clustered sharded architecture, secure via VPC network controls, Redis AUTH, TLS, KMS, and centralized logging and monitoring.
- For both types of services, maintain operational hygiene: track control-plane changes (CloudTrail), evaluate service updates, and centralize logs and metrics to support detection and incident response.
- Amazon OpenSearch Service documentation: https://docs.aws.amazon.com/opensearch-service/
- OpenSearch security and fine-grained access control: https://opensearch.org/docs/
- ElastiCache for Redis documentation: https://docs.aws.amazon.com/elasticache/latest/red-ug/WhatIs.html
- AWS Key Management Service (KMS): https://docs.aws.amazon.com/kms/