Skip to content
Boomspot
  • Home
Loading...
Boomspot

Daily tech news, software development coverage, Apple reporting, and the gear behind modern music making.

TwitterLinkedIn

Browse

  • Categories
  • Tags
  • Authors

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Unsubscribe

© 2026 Boomspot. All rights reserved.

Built by Boomspot
Updated hourly

AI Content Disclosure: Articles on Boomspot are researched, written, and edited with the assistance of advanced AI systems. We combine software-assisted research with editorial oversight to deliver useful, accurate, and practical technical and music production content. Learn more about our editorial approach.

Browse by Category

Technology680Coding189Linux63SEO62Studio Gear43Music Production40Apple Rumors11

Popular Posts

Speed Up Linux Kernel Compile Time: 7 Practical Fixes

Speed Up Linux Kernel Compile Time: 7 Practical Fixes

8 min read
Is Linux on PS5 Worth It? pLinux5-NG vs. a Mini PC

Is Linux on PS5 Worth It? pLinux5-NG vs. a Mini PC

7 min read
How to Test Budget DJ Headphones and Speakers at Home

How to Test Budget DJ Headphones and Speakers at Home

10 min read
Beginner-Friendly Terminal Editor: TTT vs micro vs Edit

Beginner-Friendly Terminal Editor: TTT vs micro vs Edit

8 min read
Affiliate Site Audit: Measure Your Google Traffic Risk

Affiliate Site Audit: Measure Your Google Traffic Risk

11 min read

Recent Posts

Suno Bridge with Ableton Live 12: Try the Beta or Wait?

Suno Bridge with Ableton Live 12: Try the Beta or Wait?

Nov 17, 2026•7 min
Google Places API 120 Results Limit Workaround (Python)

Google Places API 120 Results Limit Workaround (Python)

Nov 17, 2026•9 min
Why SpaceX Wants to Catch Starship's Upper Stage, Explained

Why SpaceX Wants to Catch Starship's Upper Stage, Explained

Nov 16, 2026•6 min
Wine on ARM64 AVX Support: Will Your Windows Apps Run?

Wine on ARM64 AVX Support: Will Your Windows Apps Run?

Nov 16, 2026•6 min
Do Audio Plugins Need a GPU? Check Before You Buy It

Do Audio Plugins Need a GPU? Check Before You Buy It

Nov 16, 2026•7 min
  1. Home
  2. Coding
  3. RDS Inaccessible Encryption Credentials: KMS Triage Guide
coding9 min read

RDS Inaccessible Encryption Credentials: KMS Triage Guide

Your app times out, a snapshot fails with AccessDenied, and the security groups look fine. Here is a 10-minute runbook to confirm or rule out KMS before you burn hours on the network.

S

Staff

November 16, 2026

Reviewed byDorian

RDS Inaccessible Encryption Credentials: KMS Triage Guide

Rule out KMS before you touch a security group

Your app times out, a manual snapshot fails with AccessDenied, and the security groups look fine. You can burn an afternoon on NACLs and route tables, or you can spend ten minutes asking one question: can this database still use its KMS key?

This runbook walks from symptom to cause for KMS-encrypted RDS and Aurora, including Terraform-managed and multi-account setups. It separates the four KMS failure modes (key state, key policy or grants, IAM, cross-account) from plain network and credential problems.

Every CLI and Terraform snippet here is unexecuted. None of it has been run against a real account, so test in a sandbox first and replace the placeholders.

Claims to verify before you rely on them

A dev.to write-up lists symptoms and four causes. The causes are reasonable, but three of its claims need checking against AWS documentation, because the article cites no AWS pages for them.

  1. "Available" during a KMS failure. The article says the console shows Available while snapshots fail. RDS documents separate instance statuses for lost encryption access (look for names starting with inaccessible-encryption-credentials in the RDS User Guide). Treat "Available" plus a failing snapshot as possible, not guaranteed, and read the real status yourself.
  2. A KMSKeyError CloudWatch metric. The article says it spikes but never shows where it lives. Search the RDS metrics list in the CloudWatch docs before building an alarm on it. RDS events and CloudTrail are more dependable signals.
  3. rds.amazonaws.com as a key policy principal. The article suggests granting the service principal directly. RDS normally acts through KMS grants and the service-linked role (AWSServiceRoleForRDS), so a service-principal statement is usually not what makes a key work. This is an inference from how RDS and KMS grants are described, so confirm it in the KMS and RDS encryption docs.

One more point to question: the article says the application's IAM role needs kms:Decrypt to connect. A normal database connection does not call KMS from the app. The exception is an app that reads its password from a secret encrypted with the same CMK, where the app role does need decrypt rights. That is an inference, so verify it for your setup.

The 10-minute triage

Work top to bottom and stop at the first hit.

Step 1: Read the instance status and events

Status and events tell you whether RDS itself is complaining.

## UNEXECUTED
aws rds describe-db-instances --db-instance-identifier <instance-id> --query "DBInstances[0].[DBInstanceStatus,KmsKeyId,StorageEncrypted]"
aws rds describe-events --source-type db-instance --source-identifier <instance-id> --duration 1440

For Aurora, also run aws rds describe-db-clusters and read the cluster-level KmsKeyId. If the status name mentions encryption credentials, go to step 2. If the status is Available and events are quiet, keep going anyway, since snapshots and replication may be the first things to fail.

Step 2: Check the key state

## UNEXECUTED
aws kms describe-key --key-id <key-arn> --query "KeyMetadata.[KeyState,Enabled,DeletionDate]"

A healthy key returns Enabled and true. Anything else, such as Disabled or PendingDeletion, is failure mode one. Stop here and jump to the fixes.

Run this in the key's region and account. For a cross-account key, you need kms:DescribeKey permission on it.

Step 3: Search CloudTrail for what changed

CloudTrail event history covers management events for the last 90 days, per region.

## UNEXECUTED
aws cloudtrail lookup-events --lookup-attributes AttributeKey=EventSource,AttributeValue=kms.amazonaws.com --max-results 50 --query "Events[].[EventTime,EventName,Username]"

Scan for DisableKey, ScheduleKeyDeletion, PutKeyPolicy, RevokeGrant, RetireGrant and CreateGrant. Whoever touched the key shortly before the outage is your lead. Failed calls from RDS or your role show up with an error code in the event detail, so open the raw record for anything suspicious.

Step 4: List the grants

RDS uses grants for encrypted resources. A revoked or retired grant can break RDS without any visible change to the key policy. For more on this, see related: pagespeed insights score changed without site changes?.

## UNEXECUTED
aws kms list-grants --key-id <key-arn> --query "Grants[].[GrantId,GranteePrincipal,RetiringPrincipal,Operations]"

Look for grants whose principal is the RDS service-linked role, with operations such as Decrypt and GenerateDataKey. No RDS grants at all on a key with an active instance is a red flag. The dev.to article never mentions grants, so check the grant details against the KMS docs for your engine.

Step 5: Compare key policy, IAM and the caller

Key policy, IAM policy and grants answer different questions:

  1. Key policy is the gate. Without it, nothing else works. A common safe default is a statement that trusts the account root, which lets IAM policies take effect.
  2. IAM policy matters for people and automation that create or use the encrypted resource. Creating an encrypted instance needs kms:CreateGrant and kms:DescribeKey, among others.
  3. Grants are what RDS itself usually relies on at runtime.

Check the key policy and simulate the caller:

## UNEXECUTED
aws kms get-key-policy --key-id <key-arn> --policy-name default --output text
aws iam simulate-principal-policy --policy-source-arn <role-arn> --action-names kms:Decrypt kms:GenerateDataKey kms:CreateGrant --resource-arns <key-arn>

Simulation does not model every cross-account or grant case, so a pass does not prove the call will succeed.

Step 6: If KMS is clean, go back to networking and credentials

Key enabled, grants present, no suspicious CloudTrail events, status normal? KMS is probably innocent. Check security groups, subnet routes and DNS, then test the port from the app's network. If only authentication fails, check the secret itself, and if the secret uses a separate KMS key, whether the app role can use that one.

Fixes by failure mode

Key state: disabled or pending deletion

If the key is PendingDeletion, cancel the deletion first. The documented behavior is that cancelling returns the key to Disabled, not Enabled, so you also need to enable it.

## UNEXECUTED
aws kms cancel-key-deletion --key-id <key-arn>
aws kms enable-key --key-id <key-arn>

The dev.to article stops at cancel-key-deletion and leaves out the enable step. Once the key is enabled, check the RDS docs for the recovery steps for your status, since some states need a start or reboot. After the waiting period expires, the key material is gone. Only a snapshot copy in another account or region, or a backup encrypted with a different key, can save you. This pairs well with go deeper on binary serialization vs json: varints, tags and caches.

Key policy or grants

Restore the statement that trusts the account root. To get RDS to recreate its grants, run an operation through a principal that holds kms:CreateGrant. Do not delete or edit AWSServiceRoleForRDS by hand. If you can't tell whether a grant is missing or just unlisted, open an AWS support case rather than guessing.

IAM

Scope permissions to the key ARN, never Resource: "*". Give the Terraform or CI role kms:CreateGrant, kms:DescribeKey, kms:Decrypt and kms:GenerateDataKey* on that key only.

Cross-account

Two sides must agree. The key policy in the key account must name the other account (or a specific role), and the role in the database account needs an IAM policy that allows the same actions on the key ARN. If either side is missing, calls fail with AccessDenied.

Minimal Terraform: CMK, key policy and encrypted Aurora

This is a sketch, unexecuted. The version constraints are illustrative, not checked against current releases, so pin what you have tested.

## UNEXECUTED. Requires Terraform >= 1.5 and hashicorp/aws ~> 5.0 (illustrative)
terraform {
  required_version = ">= 1.5"
  required_providers {
    aws = { source = "hashicorp/aws", version = "~> 5.0" }
  }
}

variable "subnet_ids" { type = list(string) }
variable "db_password" {
  type      = string
  sensitive = true
}

data "aws_caller_identity" "current" {}

resource "aws_kms_key" "db" {
  description             = "Aurora CMK"
  enable_key_rotation     = true
  deletion_window_in_days = 30
  policy = jsonencode({
    Version = "2012-10-17"
    Statement = [{
      Sid       = "EnableIAMPolicies"
      Effect    = "Allow"
      Principal = { AWS = "arn:aws:iam::${data.aws_caller_identity.current.account_id}:root" }
      Action    = "kms:*"
      Resource  = "*"
    }]
  })
  lifecycle { prevent_destroy = true }
}

resource "aws_db_subnet_group" "db" {
  name       = "aurora-kms-demo"
  subnet_ids = var.subnet_ids
}

resource "aws_rds_cluster" "db" {
  cluster_identifier        = "aurora-kms-demo"
  engine                    = "aurora-postgresql"
  master_username           = "app_admin"
  master_password           = var.db_password
  db_subnet_group_name      = aws_db_subnet_group.db.name
  storage_encrypted         = true
  kms_key_id                = aws_kms_key.db.arn
  final_snapshot_identifier = "aurora-kms-demo-final"
}

*Also read:* [related topic: schedule a nightly supabase edge function with pg_cron](/schedule-a-nightly-supabase-edge-function-with-pg-cron)

resource "aws_rds_cluster_instance" "db" {
  identifier         = "aurora-kms-demo-1"
  cluster_identifier = aws_rds_cluster.db.id
  engine             = aws_rds_cluster.db.engine
  instance_class     = "db.r6g.large"
}

The prevent_destroy setting and the 30-day deletion window are the guardrails here. They don't stop someone from scheduling deletion in the console, which is why the EventBridge rule below exists.

Verify

After apply, confirm the cluster uses your key and the key is healthy:

## UNEXECUTED
aws rds describe-db-clusters --db-cluster-identifier aurora-kms-demo --query "DBClusters[0].[StorageEncrypted,KmsKeyId,Status]"
aws kms describe-key --key-id <key-arn> --query "KeyMetadata.KeyState"

Expected, not captured from a real run: true, the key ARN, available, then "Enabled".

Failure case

In a sandbox only, run aws kms disable-key --key-id <key-arn>, then try aws rds create-db-cluster-snapshot for the cluster. Expect an error and a changed key state: describe-key returns Disabled, and lookup-events shows DisableKey. That sequence is the signature you hunt for during an incident. Re-enable with aws kms enable-key.

Guardrails

| Guardrail | What it catches | How | | --- | --- | --- | | EventBridge rule | DisableKey and ScheduleKeyDeletion | Event pattern with source aws.kms, detail-type AWS API Call via CloudTrail and those event names, targeted at SNS or chat. Deploy it in every region that holds keys. | | checkov scan | Missing rotation, wildcard key policies | Run checkov -d . against the Terraform directory in CI and review key-related findings. The scan does not see console changes. | | Cross-account key policy review | Overbroad or missing external principals | Review each external account in the key policy quarterly, prefer specific roles over account root, and use IAM Access Analyzer findings (the dev.to article recommends it for this). | | prevent_destroy on the key | Accidental Terraform removal | Lifecycle block shown above. |

IAM Access Analyzer and checkov are both worth running, but neither replaces the alert. Only the alert tells you within minutes that someone scheduled a key for deletion.

What to do after the incident

Add the EventBridge rule first. Planned rotations or cleanups may trigger your first alerts, which is a good moment to tighten who can call ScheduleKeyDeletion. Then check the three flagged claims against the current AWS docs, and update your runbook with the exact status names and metrics your account really shows.

Tags

CybersecurityCloud ComputingCoding Best PracticesDeveloper Tools

Keep reading

WebAssembly: Unleashing Native Speed in Web Browsers
Coding•4 min read

WebAssembly: Unleashing Native Speed in Web Browsers

WebAssembly is transforming web development with near-native performance, enabling more complex and efficient applications.

Sep 6, 2025

Zelenskyy's Firm Stand: No Land for Putin
Technology•3 min read

Zelenskyy's Firm Stand: No Land for Putin

Ukrainian President Zelenskyy's firm rejection of a territory swap with Russia highlights a steadfast commitment to sovereignty and the pivotal role of technology in modern warfare.

Sep 4, 2025

Revolutionizing Code with GitHub Copilot X
Coding•3 min read

Revolutionizing Code with GitHub Copilot X

GitHub Copilot X revolutionizes software development, offering AI-driven pair programming to enhance efficiency, learning, and code quality.

Sep 6, 2025

More stories for your next project

Get tech, coding, and music production updates in your inbox.

Unsubscribe anytime.