Skip to content

RDS Instance in Inaccessible-encryption-credentials-recoverable Status - Need Recovery Assistance

0

Issue Description

I am experiencing an issue with my Amazon RDS instance and need assistance to resolve it. The database is currently in the "Inaccessible-encryption-credentials-recoverable" status, preventing me from connecting to it or restoring its functionality.

RDS Instance Details

  • DB Identifier: tur........
  • Engine: PostgreSQL
  • Class: db.t4g.micro
  • Region & AZ: eu-north-1c
  • VPC: vpc-022b.............
  • Security Group: sg-0b4d.......... (Active)
  • Publicly Accessible: Yes
  • Current Status: Inaccessible-encryption-credentials-recoverable

Background I have been informed by AWS Türkiye that this status occurs when the RDS instance loses access to the KMS key used for encryption. They suggested using the AWS CLI command start-db-instance to attempt recovery, as the AWS Management Console cannot be used in this state. However, I would prefer to proceed with guidance to ensure the process is handled correctly and to avoid any risk of data loss.

I have also been advised that the instance will remain in this recoverable state for 7 days (likely starting around May 25, 2025), after which it will transition to a terminal state, requiring restoration from a snapshot. This database is critical for my application running on an EC2 instance (IP: 16.16.213.90), so I need to resolve this issue urgently.

Additional Information I have encountered a DNS resolution issue on my EC2 instance ("Name or service not known" when attempting to connect to the RDS endpoint). I am working on resolving this, but I mention it in case it is relevant to the recovery process.

Request for Assistance Could you please help with the following:

  1. Verify the status of the KMS key associated with this RDS instance and assist in restoring access if possible.
  2. Guide me through the recovery process using the start-db-instance command or suggest alternative steps.
  3. If recovery is not possible, advise on the best way to restore the database from a snapshot without data loss.

I would appreciate your prompt assistance, as the 7-day recovery window is time-sensitive (today is May 26, 2025, 18:36 +03). I can provide additional details, such as CLI outputs or logs, if needed.

Thank you for your support!

asked a year ago326 views

2 Answers
0

Hello Alex,

Yes, the problem you're facing — RDS instance in “Inaccessible-encryption-credentials-recoverable” status — is directly related to encryption key issues and can be addressed using the guidance in the two AWS links you've shared, particularly the first one.

Here is a concise and community-friendly answer you can use, following AWS re:Post guidelines:


Answer: RDS Instance in "Inaccessible-encryption-credentials-recoverable" Status

This issue typically occurs when the Amazon RDS instance loses access to the AWS KMS key used to encrypt the database. The instance becomes temporarily inaccessible, but recoverable within 7 days if the KMS key issue is resolved.

Recommended Actions:

  1. Verify the KMS key status:

    • Go to AWS KMS Console > Select the key used for the RDS instance.
    • Ensure the key is enabled and not scheduled for deletion.
    • Check that the key policy allows access to the RDS service.
  2. Restore Access to the RDS Instance:

    • Once the KMS key is re-enabled or access is restored, run the following CLI command to restart the DB:

      aws rds start-db-instance --db-instance-identifier your-db-instance-id
    • You can monitor the status via:

      aws rds describe-db-instances --db-instance-identifier your-db-instance-id
  3. Alternative (if key access cannot be restored):

    • Restore the database from the latest snapshot to a new instance using a valid, accessible KMS key.

Important: The instance remains recoverable only for 7 days after entering this state. After that, the only option is restoring from backup/snapshot.


References:

answered a year ago

0

The issue with the RDS instance in the "Inaccessible-encryption-credentials-recoverable" state is tied to a loss of access to the KMS key used for encryption. This state indicates that either the KMS key was disabled, deleted, or its access permissions revoked. The first step to resolve this is to navigate to the AWS KMS settings and verify the status of the associated key. The key should be set to "Enabled" and retain permissions that allow the RDS instance to decrypt and access its data. Additionally, ensure that the IAM role linked to the RDS instance has policies allowing actions such as 'kms:Decrypt', 'kms:Encrypt', and 'kms:DescribeKey'.

If the KMS key is intact and correctly configured, the recovery of the database instance can be initiated via the AWS CLI. Using the 'start-db-instance' command on the affected DB identifier should allow the service to restore access. The progress of this recovery should be monitored through the 'describe-db-instances' CLI command to ensure the instance transitions back to an "Available" state.

In the event that the recovery fails, the database can be restored from its most recent available snapshot. Identifying the latest snapshot through the AWS CLI and restoring it into a new RDS instance ensures minimal data loss. Application configurations, such as the connection endpoint, will need to be updated to reflect the new database instance.

Additionally, the DNS resolution issue encountered on the associated EC2 instance may not be directly related but is critical to address. Review the network configurations, specifically DNS settings in the EC2's 'resolv.conf' file, and ensure traffic to port 53 is not restricted by the security group. Properly resolving DNS ensures seamless communication between the application and the database.

To prevent future occurrences, it is advisable to maintain regular snapshots for disaster recovery, monitor the health of KMS keys, and ensure IAM permissions remain intact to access encryption credentials. Proper planning around resource management will reduce downtime and ensure the continuity of critical database operations.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.