Skip to main content
This article continues the series on designing secure architectures for AWS managed database services. In this installment we cover security patterns and controls for:
  • Amazon MemoryDB for Redis
  • Amazon DocumentDB (MongoDB-compatible)
  • Amazon Keyspaces (for Apache Cassandra)
  • Amazon Neptune (graph database)
For each service we’ll walk through authentication & authorization, network protection, encryption options, and detection/monitoring, with practical recommendations you can apply today.

Amazon MemoryDB for Redis

Overview
  • MemoryDB is a fully managed, Redis-compatible, in‑memory database that replicates data across multiple Availability Zones using a primary–replica topology.
  • Clients connect using cluster/configuration endpoints inside your VPC; typical AWS network primitives (VPC, security groups, NACLs, IAM) apply.
An infographic-style question about a fintech startup evaluating Amazon MemoryDB for Redis with four numbered answer choices. The highlighted choice states MemoryDB for Redis is a fully managed in-memory database that replicates data across multiple Availability Zones.
Access control in MemoryDB
  • Use Redis Access Control Lists (ACLs) to create Redis users with username/password and to grant command- and key-level permissions inside the Redis engine.
  • Use IAM to control management-plane operations (console/API) — ACLs do not replace IAM for cluster provisioning, snapshot management, or console/API actions.
Use IAM for management-plane permissions (console/API), and Redis ACLs for fine-grained command/key permissions inside the Redis engine.
A teal-themed infographic showing a multiple-choice question about using Redis Access Control Lists (ACLs) with Amazon MemoryDB for Redis, followed by four numbered answer options. The choices discuss ACL capabilities like fine‑grained permissions, reliance on IAM, console/API restrictions, and encryption.
Networking: VPC interface endpoints and PrivateLink
  • MemoryDB supports VPC interface endpoints (AWS PrivateLink) for service and management API traffic.
  • Data-plane client connections typically stay inside your VPC via cluster endpoints, so traffic does not traverse the public internet when correctly configured.
  • Gateway endpoints are not supported for MemoryDB.
A slide asking which statement correctly describes integrating VPC Interface Endpoints with Amazon MemoryDB for Redis for a financial technology company. Four numbered answer choices are shown, with the first option (saying MemoryDB supports VPC Interface Endpoints for private connectivity) highlighted.
Encryption options
  • Encryption at rest: AWS KMS-managed keys (customer-managed or AWS-managed).
  • Encryption in transit: TLS.
  • Client-side encryption: not provided by MemoryDB itself — build it into your application if you require an additional layer.
  • Note: Transparent Data Encryption (TDE) is an RDS feature and does not apply to MemoryDB.
The image is a slide asking which encryption options are available in Amazon MemoryDB for Redis. It lists four options: encryption at rest using AWS KMS, in‑transit encryption using TLS, client‑side encryption with the AWS SDK, and Transparent Data Encryption (TDE).
Detection and events
  • MemoryDB emits events and integrates with CloudWatch for metrics and CloudTrail for management/audit logs.
  • Use MemoryDB events routed to Amazon SNS for notifications (failover, topology changes, snapshot completion, etc.) and CloudWatch alarms for operational thresholds.
Slide titled "MemoryDB for Redis" with a checklist asking "What did we miss?" (Detection?, IAM?, Infrastructure?, Data?, Application?, Incident Response?). To the right is an icon of a rising bar chart with a clock and a note about AWS MemoryDB monitoring/events.
An infographic-style question about a fintech company using Amazon MemoryDB for Redis that asks which statement about MemoryDB events is accurate. It shows four multiple-choice options describing event notifications and monitoring (CloudWatch, CloudTrail, Amazon SNS, and the AWS Console).
Practical recommendations
  • Enforce TLS between clients and MemoryDB clusters.
  • Use Redis ACLs to minimize available commands and restrict key access to reduce blast radius.
  • Enable CloudWatch metrics/alarms and route events to SNS for on-call notifications.

Amazon DocumentDB (MongoDB‑compatible)

Overview
  • Amazon DocumentDB is a managed, MongoDB-compatible document database optimized for JSON document workloads.
  • It runs inside your VPC and uses security groups, NACLs, and other standard AWS network controls.
Slide titled "DocumentDB" showing three users (appAdmin, appUser, analytics) connected to "products" and "Admin" databases. A side panel lists each user's roles and database privileges.
Authentication and RBAC
  • DocumentDB supports native MongoDB-style username/password authentication and role-based access control (RBAC) inside the engine.
  • IAM is used for management-plane operations (console/API). Combine IAM and native users where appropriate — IAM controls creation, snapshots, and clusters, while native DB users are used by applications to authenticate to the database.
An infographic slide asking which statement correctly describes Amazon DocumentDB’s basic authentication, with a teal header and four numbered answer options. The choices mention native MongoDB username/password auth, AWS IAM-only auth, biometric authentication, and mandatory MFA.
Cluster architecture and ports
  • DocumentDB uses a primary–replica architecture across AZs with cluster and reader endpoints to route reads/writes appropriately.
  • Default port: 27017 (MongoDB default) — ensure security groups limit access to trusted application subnets and bastion hosts as needed.
A diagram of an AWS DocumentDB cluster architecture showing three availability zones with one primary instance and two replicas, labeled cluster and reader endpoints. Arrows indicate read/write traffic to data copies stored in a shared cluster volume and a note about VPC/security and MongoDB's default port 27017.
The image is a quiz slide asking which statement about Amazon DocumentDB’s default port is true, noting DocumentDB is MongoDB-compatible. Four answer choices are shown: port 80, port 443 (SSL), port 27017 (MongoDB’s default), or no fixed/random port.
Client-side field-level encryption (CSFLE)
  • DocumentDB works with MongoDB drivers that support client-side field-level encryption (CSFLE). The driver encrypts sensitive fields before sending them to the server; encryption keys are typically stored in AWS KMS.
  • Before implementing CSFLE, verify driver and engine compatibility, because not all MongoDB server features are supported by DocumentDB.
Confirm compatibility between your MongoDB driver version and the DocumentDB engine version before enabling client-side field-level encryption — mismatches can cause runtime errors.
An infographic slide asking how a financial services company can implement client-side field-level encryption in Amazon DocumentDB, with four numbered solution options (use AWS KMS, DocumentDB’s client-side encryption, AWS Lambda for real-time encryption, and a key-vault collection for data keys). The design has a turquoise header and rounded grey answer boxes, credited to KodeKloud.
Encrypting data at rest and in transit
  • DocumentDB supports encryption at rest using AWS KMS (customer-managed or AWS-managed keys).
  • In-transit encryption uses TLS. For CSFLE, the application needs KMS permissions to access data-encryption-keys.
A screenshot of a DocumentDB "Data-at-Rest" settings page showing Encryption-at-rest enabled with a dropdown selecting "DocumentDB-MasterKey" and blurred Account/KMS key fields. A pink arrow points to the master key selector.
A quiz-style slide asking which encryption options Amazon DocumentDB provides for data security, with a prompt to choose two. The right column lists five choices: Encryption at Rest using AWS KMS; In-transit encryption using TLS; Field-level encryption using AWS SDK; Transparent Data Encryption (TDE); and Automated Proxy encryption using RDS Proxy.
Detection and profiling
  • DocumentDB integrates with CloudWatch for metrics (CPUUtilization, FreeableMemory, connections, etc.) and CloudTrail for API-level auditing.
  • DocumentDB exposes a profiler that logs slow queries and operations — use the profiler to identify and optimize slow-running operations.
An infographic asking which CloudWatch metric is usually the first indicator of activity on an Amazon DocumentDB cluster. It lists four options: CPUUtilization, NetworkPacketsOut, FreeableMemory, and VolumeBytesUsed.
A colorful infographic asking which statement accurately describes the DocumentDB Profiler in Amazon DocumentDB. It shows four numbered answer options describing possible profiler capabilities like capturing real-time metrics, rewriting queries, logging slow operations, or blocking queries.
Practical recommendations
  • Restrict access to port 27017 by security group rules and avoid exposing cluster endpoints to public subnets.
  • Use TLS and KMS-backed keys for all sensitive datasets.
  • Enable CloudWatch alarms on CPUUtilization, FreeableMemory, and slow query rates.

Amazon Keyspaces (for Apache Cassandra)

Overview
  • Amazon Keyspaces is AWS’s managed Cassandra-compatible service. It is designed to support Cassandra drivers but shifts authentication/authorization to IAM rather than native Cassandra password auth.
A slide showing a fintech scenario asking which authentication methods Amazon Keyspaces (for Apache Cassandra) supports, with four numbered multiple-choice options (password/native protocol, IAM-based, LDAP-based, and JWT token-based).
Authentication and credentials
  • Keyspaces uses IAM for client authentication and authorisation. Clients authenticate using IAM credentials (for example, via AWS SDKs or by assuming an IAM role).
  • Use AWS Secrets Manager to store non-IAM connection metadata if you need a central secrets store for application configuration.
Example: retrieving credentials from Secrets Manager inside a container entrypoint script
An infographic slide posing a question about how a financial analytics company can use IAM roles to secure access to Amazon Keyspaces for Apache Cassandra. It shows four numbered answer options suggesting different IAM role and temporary credential approaches.
Use of IAM roles and temporary credentials
  • Prefer IAM roles and temporary credentials (AssumeRole, STS) for applications, ECS tasks, and Lambda functions — avoid long-lived static credentials.
  • Grant least-privilege Keyspaces permissions to the role; attach IAM policies that scope access to specific tables and actions.
Use IAM roles and short-lived credentials instead of long-lived keys to improve auditability and reduce credential risk for Keyspaces access.
Shared responsibility and KMS integration
  • AWS manages the Keyspaces control plane and infrastructure; you manage your data, table-level access controls, and KMS keys.
  • Keyspaces integrates with AWS KMS for encryption at rest; you may choose AWS-managed or customer-managed keys.
An infographic slide titled "How does the shared responsibility model apply to Amazon Keyspaces for Apache Cassandra?" showing four numbered answer boxes summarizing AWS vs. customer responsibilities (physical security, encryption, access controls, and management). The slide includes a KodeKloud copyright at the bottom.
A slide diagram titled "Keyspaces (for Apache Cassandra)" showing AWS Key Management Service (KMS) integrated with Amazon Keyspaces and the encryption flow: an AWS KMS key encrypts a table key, which encrypts data encryption keys that in turn encrypt stored data. A note at left says encryption at rest can use either AWS- or customer-managed keys via KMS.
Encryption in transit and storage
  • Keyspaces enforces TLS for client connections; ensure drivers are configured to use SSL/TLS.
  • Data at rest is encrypted using KMS-managed keys.
An infographic asking how a fintech startup can encrypt tables in Amazon Keyspaces for Apache Cassandra, with a teal header and four numbered options. The options listed are: use a CREATE TABLE ENCRYPTED keyword, rely on Keyspaces’ automatic at-rest encryption, integrate AWS KMS for table keys, or encrypt data via AWS Lambda before writing.
A diagram titled "Keyspaces (for Apache Cassandra)" showing Cassandra clients (drivers, cqlsh, and the Amazon Keyspaces console) connecting to Amazon Keyspaces over TLS with encryption in transit, and data stored in encrypted storage on the backend.
Detection and monitoring
  • Keyspaces publishes CloudWatch metrics for throughput and latency and integrates with CloudTrail for API audit logs.
  • For application-level tracing, instrument drivers and use AWS X-Ray if needed; CloudWatch/CloudTrail are the primary service-level detection sources.
Practical recommendations
  • Enforce TLS in drivers and rotate KMS keys periodically (using customer-managed keys gives more control).
  • Use IAM policy conditions to scope access by resource ARNs and tags.

Amazon Neptune (Graph Database)

Overview
  • Neptune is a managed graph database service (supports Gremlin, SPARQL) with architecture similar to other AWS managed databases: runs inside your VPC with cluster endpoints and replicas for read scaling.
A presentation slide titled "Neptune (neo4j)" showing an AWS Neptune graph database. The right side has an architecture diagram with a VPC, public subnets, a Neptune cluster (primary and read replicas), a network load balancer, a Lambda for IP registration, DNS server and CloudWatch, and a note about IAM DB auth.
Authentication and access control
  • Neptune supports IAM DB authentication for connecting clients, and also supports local DB users for database-level access where applicable.
  • Use IAM for management-plane actions and to scope who can create, snapshot, modify, or delete clusters.
Patching and maintenance
  • Engine and instance patching are managed by AWS. Control patch timing by setting maintenance windows so updates occur in controlled timeframes.
An infographic slide asking how a financial institution can manage patching for its Amazon Neptune database. It lists four numbered options: manually download patches from the Neptune dashboard, schedule maintenance windows to apply patches automatically, use AWS Lambda to trigger patch installations, or rely on EC2 Systems Manager to push patches.
Encryption and logging
  • Neptune supports encryption at rest with AWS KMS and encryption in transit via TLS.
  • For detection, use CloudWatch metrics and CloudTrail for API-level auditing. Neptune provides slow-query and error logs; enable and forward these logs to CloudWatch Logs or a SIEM for retention and analysis.
A colorful slide asking which encryption options are available in Amazon Neptune. It lists four options: encryption at rest using AWS KMS, in-transit encryption with TLS, client-side encryption via the AWS SDK, and Transparent Data Encryption (TDE).
Detection and event notifications
  • Neptune emits cluster events and integrates with SNS for event-based notifications (failovers, recovery, backups).
  • Combine CloudWatch alarms, CloudTrail, and cluster events to create a robust monitoring and alerting pipeline.
An infographic slide asking which statement describes Amazon Neptune's event notification capability, with four numbered answer options. The top (01) option says Neptune Events let users subscribe to specific database events using Amazon SNS.
Practical recommendations
  • Run Neptune clusters in private subnets and protect endpoints with strict security group rules.
  • Enable TLS, KMS encryption, and forward slow-query logs to CloudWatch Logs for proactive analysis.

Quick Reference — Security Controls by Service


Final recommendations and shared responsibility

  • Apply the shared responsibility model: AWS manages the infrastructure and engine patching; you are responsible for data protection, access controls, KMS key lifecycle, and application-level security.
  • Standardize on these controls across services where possible:
    • Use IAM roles and short-lived credentials.
    • Enforce TLS for all client connections.
    • Use KMS-backed encryption at rest and restrict key usage via IAM.
    • Centralize monitoring (CloudWatch, CloudTrail) and forward critical logs/events to a SIEM or incident response pipeline.
    • Validate driver compatibility with managed engines (especially for DocumentDB CSFLE).
References and further reading These core controls will help you “turn up” the security posture for your managed AWS database services while balancing operational needs and application compatibility.

Watch Video