Cloud Defense Logo

Products

Solutions

Company

Book A Live Demo

IAM Authentication Rule for RDS Instances

This rule requires configuring IAM authentication for RDS instances to enhance security measures.

RuleIAM authentication should be configured for RDS instances
FrameworkAWS Foundational Security Best Practices
Severity
Medium

IAM Authentication for RDS Instances

Description

IAM authentication is an important security feature that allows you to manage and control access to your Amazon RDS (Relational Database Service) instances using IAM (Identity and Access Management) users and roles. By enabling IAM authentication for RDS instances, you can securely authenticate connections to your databases, reducing the need to use database credentials directly.

Troubleshooting Steps (if applicable)

  1. 1.
    Ensure that your RDS instance is using the correct database engine version that supports IAM authentication. IAM authentication is available for Amazon RDS for MySQL, MySQL-compatible Aurora, Amazon RDS for PostgreSQL, PostgreSQL-compatible Aurora, Amazon RDS for MariaDB, and Amazon RDS for Oracle.
  2. 2.
    Verify that you have the necessary IAM permissions to enable IAM authentication. You must have the
    rds-db:connect
    and
    iam:PassRole
    permissions to enable IAM authentication for an RDS instance.
  3. 3.
    Check if the IAM authentication option is already enabled for your RDS instance. If it is, proceed with connecting using IAM authentication.

Necessary Codes (if applicable)

If you prefer to use AWS CLI or AWS SDKs, you can enable IAM authentication for an RDS instance using the following AWS CLI command:

aws rds modify-db-instance \
    --db-instance-identifier YOUR_DB_INSTANCE_IDENTIFIER \
    --enable-iam-database-authentication

Replace

YOUR_DB_INSTANCE_IDENTIFIER
with the identifier of your RDS instance.

Step-by-Step Guide for Remediation

1. Access the AWS Management Console

Log in to the AWS Management Console using your IAM user credentials: https://console.aws.amazon.com/

2. Navigate to the RDS Dashboard

Click on the "Services" dropdown and select "RDS" under the "Database" section. You can also search for "RDS" in the search bar at the top and select the appropriate result.

3. Select the RDS Instance

From the list of RDS instances, choose the one for which you want to configure IAM authentication.

4. Enable IAM Authentication

In the RDS instance details page, click on the "Modify" button in the top-right corner.

5. Enable IAM Authentication Option

Scroll down to the "Database options" section and locate the "IAM DB authentication" option. Check the box next to it to enable IAM authentication.

6. Save Changes

Scroll to the bottom of the page and click on the "Continue" button. Review the modifications and click on the "Modify DB Instance" button to save the changes.

7. Test IAM Authentication

Once the modification is complete, you can test IAM authentication by connecting to your RDS instance using IAM credentials. Refer to the documentation of your preferred database client or programming language to learn how to connect using IAM authentication.

Conclusion

Enabling IAM authentication for your Amazon RDS instances enhances the security of your databases by allowing you to manage access through IAM. With IAM authentication in place, you can reduce the usage of database credentials and strengthen the overall security posture of your AWS environment.

Is your System Free of Underlying Vulnerabilities?
Find Out Now