Skip to main content
  1. Home
  2. >
  3. AWS
  4. >
  5. SAA-C03
  6. >
  7. AWS SAA-C03 Exam Scenarios
  8. >
  9. Rotate RDS Credentials Without Downtime | SAA-C03

Rotate RDS Credentials Without Downtime | SAA-C03

Jeff Taakey
Author
Jeff Taakey
21+ Year Enterprise Architect | Multi-Cloud Architect & Strategist.

While preparing for the AWS SAA-C03, many candidates get confused by credential management strategies. In the real world, this is fundamentally a decision about Security Automation vs. Operational Overhead. Let’s drill into a simulated scenario.

The Scenario
#

DigitalRetail Inc. is migrating their customer portal to AWS using a classic two-tier architecture. Their development team has deployed the application frontend on Amazon EC2 instances (t3.medium) running in an Auto Scaling group, with a backend PostgreSQL database hosted on Amazon RDS.

During the security review, the CISO flagged a critical compliance gap: database credentials are currently embedded in the application configuration files deployed with each EC2 instance. The company’s security policy mandates:

  1. Zero hardcoded credentials in application code or configuration files
  2. Automated credential rotation every 30 days
  3. Minimal operational burden on the small DevOps team (3 engineers)

The solution must align with AWS Well-Architected Framework best practices while keeping the team’s maintenance workload low.

Key Requirements
#

Implement a secure, automated credential management solution that eliminates hardcoded database passwords and performs monthly automatic rotation with the least operational overhead.

The Options
#

  • A) Store database credentials in EC2 instance metadata. Configure an Amazon EventBridge rule to trigger an AWS Lambda function monthly that updates both RDS credentials and instance metadata simultaneously.

  • B) Store database credentials in an encrypted configuration file in a private Amazon S3 bucket. Use Amazon EventBridge to schedule an AWS Lambda function that rotates RDS credentials and updates the S3 configuration file, with S3 versioning enabled for rollback capability.

  • C) Store database credentials as a secret in AWS Secrets Manager. Enable automatic rotation for the secret. Attach an IAM role to the EC2 instances with permissions to retrieve the secret from Secrets Manager.

  • D) Store database credentials as encrypted parameters in AWS Systems Manager Parameter Store. Enable automatic rotation for the encrypted parameters. Attach an IAM role to the EC2 instances with permissions to access the encrypted parameters.

Correct Answer
#

Option C.

Step-by-Step Winning Logic
#

This solution achieves the optimal balance for an Associate-level architecture decision:

  1. Native Automation: Secrets Manager includes pre-built Lambda rotation functions for RDS (PostgreSQL, MySQL, Aurora, etc.). No custom code required.

  2. Zero Hardcoding: EC2 instances retrieve credentials at runtime via the AWS SDK using their IAM role鈥攃redentials never touch application code or config files.

  3. Minimal Operations:

    • One-time setup: Create secret, enable rotation (30-day schedule), attach IAM policy
    • Ongoing maintenance: Zero鈥攔otation happens automatically
    • No Lambda development, no EventBridge rules to maintain
  4. Security Best Practices:

    • Encryption at rest (AWS KMS)
    • Fine-grained IAM access control
    • Automatic version management during rotation
    • Audit trail via CloudTrail
  5. Well-Architected Alignment: Directly satisfies the Security Pillar (SEC09-BP02: Use temporary credentials) and Operational Excellence Pillar (minimize toil).


馃拵 The Architect’s Deep Dive: Why Options Fail
#

The Traps (Distractor Analysis)
#

Why not Option A (Instance Metadata)?

  • Fatal Flaw: EC2 instance metadata cannot store custom credentials鈥攊t only contains instance-specific AWS metadata (instance ID, IAM role, etc.).
  • Operational Nightmare: You’d need to build custom metadata injection mechanisms, manage state synchronization across Auto Scaling events, and handle rotation failures manually.
  • Cost: Engineering 80+ hours to build/maintain this vs. $0.40/month for Secrets Manager.

Why not Option B (S3 + Custom Lambda)?

  • Reinventing the Wheel: You’re building what Secrets Manager already provides鈥攔otation logic, error handling, rollback mechanisms.
  • Operational Overhead:
    • Maintain Lambda function code
    • Handle rotation failures (what if RDS update succeeds but S3 upload fails?)
    • Manage S3 versioning cleanup
    • Test rotation logic with every RDS engine upgrade
  • Security Gap: S3 requires additional access patterns (GetObject calls) vs. Secrets Manager’s purpose-built API.

Why not Option D (Parameter Store)?

  • Missing Feature: Parameter Store does not have native automatic rotation. The exam tests whether you know this critical limitation.
  • Manual Workaround Required: You’d still need to build the EventBridge + Lambda solution described in Options A/B.
  • When to Use It: Parameter Store is excellent for configuration data (non-sensitive strings, app settings) or when you need the free tier (10,000 parameters). For credential rotation, Secrets Manager is the purpose-built service.

馃拵 Professional Decision Matrix

This SAA-C03 professional section is locked.
Free beta access reveals the exam logic.

100% Free Beta Access

The Architect Blueprint
#

graph TD
    subgraph "VPC - Application Tier"
        EC2[EC2 Auto Scaling Group
IAM Role Attached] end subgraph "VPC - Data Tier" RDS[(RDS PostgreSQL
Master Credentials)] end subgraph "AWS Security Services" SM[AWS Secrets Manager
Secret: db-credentials
Rotation: Every 30 days] Lambda[Managed Rotation Lambda
AWS-Provided Function] end EC2 -->|1. Retrieve Secret
IAM Role Auth| SM SM -->|2. Return Credentials| EC2 EC2 -->|3. Connect with
Current Password| RDS SM -.->|Triggers Every 30 Days| Lambda Lambda -.->|4. Update Password| RDS Lambda -.->|5. Update Secret Version| SM style SM fill:#FF9900,stroke:#232F3E,stroke-width:3px,color:#fff style Lambda fill:#FF9900,stroke:#232F3E,stroke-width:2px,color:#fff style RDS fill:#527FFF,stroke:#232F3E,stroke-width:2px,color:#fff

馃拵 Professional Decision Matrix

This SAA-C03 professional section is locked.
Free beta access reveals the exam logic.

100% Free Beta Access

Diagram Note: EC2 instances authenticate to Secrets Manager using their IAM role, retrieve current credentials on-demand, and connect to RDS鈥攁ll while Secrets Manager’s managed Lambda function handles automatic rotation every 30 days without human intervention.

Real-World Practitioner Insight
#

Exam Rule
#

“For the SAA-C03 exam, when you see ‘automatic credential rotation’ + ‘RDS’ + ’least operational overhead’, immediately select AWS Secrets Manager. Parameter Store does not have native rotation.”

Real World
#

In production environments with mature DevOps practices, teams often use a hybrid approach:

  • Secrets Manager: For RDS/Redshift credentials, third-party API keys, OAuth tokens (anything requiring rotation)
  • Parameter Store: For application configuration (feature flags, environment URLs, non-sensitive settings)
  • Cost Optimization: For non-critical dev/test environments with 10+ secrets, some teams build custom rotation with Parameter Store to avoid Secrets Manager costs鈥攂ut only when engineering time is abundant and well-documented.

Enterprise Consideration: Always integrate with AWS CloudTrail and Amazon CloudWatch to monitor GetSecretValue API calls for anomaly detection (e.g., sudden spike in credential retrievals could indicate a compromised IAM role).

馃拵 Professional Decision Matrix

This SAA-C03 professional section is locked.
Free beta access reveals the exam logic.

100% Free Beta Access