Skip to main content
Welcome, future Solutions Architects. This lesson explains key security design attributes for managed database services on AWS (for example, Amazon RDS and Aurora). We’ll cover authentication options, secrets management and rotation, network placement, monitoring and logging, and encryption in transit. Diagrams are included to illustrate configuration patterns — each image remains with its related explanation.
A slide illustrating the AWS shared-responsibility model across Infrastructure (EC2), Container/RDS, and Managed Services (S3, KMS, DynamoDB), with stacked bars showing which security and management tasks are customer vs AWS responsibilities. Arrows at the bottom indicate that moving right decreases customer responsibility and customizability.
High-level summary
  • Managed database platforms (RDS, Aurora, DynamoDB, etc.) reduce operational burden compared with self-managed databases on EC2, but the AWS shared responsibility model still applies.
  • AWS maintains the underlying platform and infrastructure; customers remain responsible for access control, configuration, data protection, and monitoring.
  • Recurring customer security responsibilities include:
    • Controlling API and console access via IAM.
    • Centralized logs and audit trails (CloudWatch Logs, CloudTrail, AWS Config).
    • Network isolation and encryption controls where applicable.
Key RDS security tasks (concise)

IAM Database Authentication (RDS)

Some RDS engines support IAM database authentication: instead of long-lived DB passwords, IAM principals obtain short-lived authentication tokens and connect to the database. This centralizes credential management under IAM and reduces password sprawl.
An AWS VPC diagram showing users connecting to an Amazon EC2 instance (with MariaDB client) in a public subnet. The EC2 instance uses IAM authentication to access an Amazon RDS for MariaDB instance in a private subnet.
Important note: Amazon RDS for MariaDB does not support IAM database authentication — the diagram illustrates the general pattern. Engines that do support IAM DB authentication include MySQL, PostgreSQL, and corresponding Aurora editions. How IAM DB authentication works (practical checklist):
  • Enable IAM DB authentication on the DB instance (during creation or by modifying the instance).
  • Generate short-lived authentication tokens for IAM principals to use instead of static DB passwords.
  • Create IAM policies that allow the rds-db:connect action for the specific DB user and attach these policies to IAM roles or users.
Example IAM policy (granting rds-db:connect for a DB user):
Exam-style summary: both enabling IAM DB authentication on the instance and granting rds-db:connect in IAM are required. The policy permission is the critical piece that allows an IAM principal to authenticate as a DB user.

Kerberos / Native Authentication Differences

Authentication options vary by engine:
  • PostgreSQL: supports native DB authentication and can be configured for Kerberos (GSSAPI).
  • SQL Server: supports Windows Authentication (Kerberos) when integrated with AWS Managed Microsoft AD.
  • Oracle and SQL Server commonly rely on native DB credentials, Kerberos, or AD integration.
Always consult engine-specific AWS docs if your architecture requires Kerberos/AD integration.

Secrets Management and Automatic Rotation

For secure storage and automatic rotation of database credentials, prefer AWS Secrets Manager. While Systems Manager Parameter Store can store secrets as SecureString, it does not provide built-in automatic rotation for DB credentials.
An AWS architecture diagram showing RDS using AWS Secrets Manager and KMS across a Central DBA account and an App account. It depicts a DBA instance, a managed secret with a resource policy, a KMS key with a key policy, and an App RDS database using the secret (with auto-rotation mentioned).
Best practices:
  • Use AWS Secrets Manager when you need automatic credential rotation, built-in versioning, and easy retrieval via SDKs.
  • Secrets Manager uses AWS KMS for server-side encryption of secret values and supports resource policies and cross-account access.
  • If you require a central security team to manage DB credentials for applications in multiple accounts, use cross-account secrets or resource policies with least privilege.
Use Secrets Manager for automatic rotation. Parameter Store can store secrets as SecureString, but it lacks native automatic rotation for database credentials.

RDS Networking and Placement

RDS instances live inside your VPC and follow the same network rules as EC2-based resources:
  • Subnets and route tables control reachability.
  • Security groups act as stateful firewalls (allow rules only).
  • Network ACLs provide optional stateless filtering at the subnet boundary.
  • When creating a DB instance, the Publicly Accessible option controls whether the DB gets a public IP. A DB in a public subnet without a public IP is not reachable from the internet.
A concise rule: an RDS instance on a public subnet is reachable from the internet only if it has a public IP and the subnet has a route to an Internet Gateway.
A network diagram of an AWS RDS setup showing a client connecting through a firewall and internet gateway into a VPC public subnet where an Amazon RDS DB instance resides inside a security group. The slide also notes that RDS is usually VM-based with VPC/subnet isolation.
Recommendation: do not expose databases directly to the internet. Place them in private subnets and restrict access via security groups, bastion hosts, or proxy services (e.g., AWS PrivateLink, RDS Proxy).

Performance and Instance Types

Select instance families based on workload characteristics. Summary guidance: For a rapidly growing e-commerce site with sustained high load, memory-optimized instances (R/X) are often appropriate.

IAM Roles and EC2 Applications

When applications run on EC2 and need to access AWS resources (Secrets Manager, S3, or IAM-authenticated DBs), use IAM instance profiles (instance roles) instead of embedding credentials.
A network diagram showing a corporate data center connecting to an AWS VPC via AWS Direct Connect and an Internet Gateway, with an Amazon EC2 instance in a public subnet accessing an Amazon RDS database in a private subnet. The caption recommends integrating RDS with IAM and using IAM roles rather than DB usernames.
Principle of least privilege:
  • Attach the minimum IAM permissions required to the EC2 instance role.
  • Retrieve secrets at runtime from Secrets Manager or Parameter Store rather than hard-coding them.
Do not hard-code credentials in application code or user data. Use IAM roles and Secrets Manager to provide secure, retrievable credentials at runtime.

Monitoring, Logging, and Detection

RDS provides multiple observability tools. Use a combination for thorough coverage:
A diagram showing Amazon RDS instances sending performance metrics (CPUUtilization, ReadLatency, FreeableMemory, WriteLatency) to Amazon CloudWatch, which generates alarms and statistics. Notifications are routed via Amazon SNS and the AWS Management Console for monitoring.
Enhanced Monitoring provides near real-time OS metrics and process-level details beyond standard CloudWatch metrics.
A screenshot of an RDS monitoring dashboard showing graphs for free/active memory, CPU usage, filesystem usage, and load averages with the caption "RDS has enhanced monitoring for OS-level Metrics." The RDS logo appears at the left.
Clarification: Enhanced Monitoring gives OS-level metrics in near real-time; it does not automatically scale instances, manage backups, or provide SQL-level analysis. For SQL-level diagnostics, use Performance Insights.
An infographic slide asking what advantage Enhanced Monitoring provides for Amazon RDS over standard CloudWatch metrics. It lists four numbered options, including real-time access to OS-level metrics, automatic scaling, backup/restore, and a visual SQL query dashboard.
Performance Insights gives detailed SQL-level context (slow queries, wait events, top SQL by load), making it a powerful tool for resolving query bottlenecks.
An infographic slide describing a fintech startup's intermittent RDS performance issues and asking which statement about Amazon RDS Performance Insights is accurate. Four numbered answer choices list possible features and limitations of Performance Insights.

Database Logs

RDS engine logs (error logs, slow query logs, general logs, audit logs depending on engine) are available via the RDS console and can be exported to CloudWatch Logs or S3. Best practices:
  • Use the RDS console for quick ad-hoc access and troubleshooting.
  • Export logs to S3 or CloudWatch Logs for long-term retention and integration with SIEM tools.
  • Correlate logs with CloudTrail and application logs to build a comprehensive timeline during investigations.

Encryption in Transit

Protect client↔DB communications by enabling TLS/SSL and validating server certificates on the client side. Configuration steps depend on the engine; typically you must:
  • Enable TLS/SSL on the DB engine (engine-specific setting).
  • Configure clients to validate the server certificate chain using the RDS root CA.
  • Optionally deploy mutual TLS where supported for stronger client authentication.
A diagram showing a Root CA issuing to three Intermediate CAs, each of which issues DB server certificates to Amazon RDS instances. The graphic illustrates certificate chain used to encrypt database traffic (data in transit).
Typical options for ensuring encryption in transit:
  • Enable SSL/TLS and validate the DB server certificate on clients (standard approach).
  • Use client-side encryption when true end-to-end encryption is needed (application encrypts data before sending to the DB), but note the added complexity.
  • KMS and TDE address encryption at rest, not in transit.
A slide asking how a health‑tech company can ensure data is encrypted in transit when communicating with an Amazon RDS instance. It lists four numbered options, including enabling SSL/TLS, using AWS KMS for at‑rest encryption, enabling TDE, and encrypting data in the application before writing to RDS.
For most use cases: enable TLS/SSL and ensure clients verify the RDS server certificate chain. Use application-level encryption only when regulatory or architectural constraints require it.

SQL Example Snippet

An example of the kind of SQL that can surface in Performance Insights or slow-query logs. Keep these examples in a SQL code block for readability and analysis.
Use Performance Insights to identify heavy SQL, top waits, and resource-consuming users/hosts so you can optimize or refactor problematic queries.

Final checklist and recommendations

  • Prefer IAM authentication where supported to avoid long-lived DB passwords.
  • Use AWS Secrets Manager for secret storage and automatic rotation of DB credentials.
  • Keep databases in private subnets and limit access with security groups, bastions, or proxies.
  • Enable Enhanced Monitoring for OS-level diagnostics and Performance Insights for SQL-level diagnostics.
  • Always enable TLS/SSL for data in transit and validate server certificates from clients.
  • Avoid hard-coded credentials — use IAM roles and Secrets Manager.
Links and references That’s the end of Part 1. Future content will cover additional managed database services and extra security controls.

Watch Video