Profile Applicability:
- Level 1
Description:
AWS Identity and Access Management (IAM) helps manage access to AWS resources. While IAM roles cannot be directly associated with Amazon Aurora instances, they can be used to control management permissions over Amazon RDS resources by assigning roles and policies to IAM users or groups.
Rationale:
Creating IAM roles and policies allows precise permission management. This determines the allowed and restricted actions of an identity or instance, following the principle of least privilege.
Impact:
Without proper IAM roles, managing access to AWS database resources becomes difficult, potentially leading to unauthorized access or operational overhead.
Default Value:
No IAM roles or policies are created by default for RDS unless explicitly configured.
Pre-requisites:
AWS account
Access to IAM dashboard
IAM administrative privileges
Remediation:
Test Plan
Using AWS Console:
Sign in to AWS Management Console
Navigate to IAM Dashboard
Click on “Roles” → “Create Role”
Choose “RDS” as the service and click “Next: Permissions”
Verify appropriate policies like AmazonRDSFullAccess are attached
Click through “Tags” (optional) and “Review” the role
Confirm role creation
Navigate to “Policies” → verify if a custom policy exists for RDS access
Confirm roles are attached to IAM users or groups
Using AWS CLI:
List existing IAM roles
aws iam list-roles
Get details of a specific role
aws iam get-role --role-name <role-name>
List attached policies for a role
aws iam list-attached-role-policies --role-name <role-name>
List IAM users and groups
aws iam list-users aws iam list-groups
Get policies attached to users or groups
aws iam list-user-policies --user-name <username> aws iam list-group-policies --group-name <groupname>
Implementation Plan
Using AWS Console:
Sign in to AWS Console
Go to IAM → Roles → Create Role
Select AWS service → choose “RDS”
Attach a policy like AmazonRDSFullAccess
Optionally add tags
Name and review the role → click “Create Role”
(Optional) Go to IAM → Policies → Create Policy
Use visual or JSON editor → define permissions → click “Create Policy”
Attach custom policy to the IAM role
Go to IAM Users/Groups → Add Permissions → Attach Role/Policy
Using AWS CLI:
Create a role with a trust policy
aws iam create-role --role-name RDSRole --assume-role-policy-document file://trust-policy.json
Attach AWS managed policy to the role
aws iam attach-role-policy --role-name RDSRole --policy-arn arn:aws:iam::aws:policy/AmazonRDSFullAccess
Create a custom policy
aws iam create-policy --policy-name CustomRDSPolicy --policy-document file://custom-policy.json
Attach the custom policy to a user
aws iam attach-user-policy --user-name <username> --policy-arn arn:aws:iam::<account-id>:policy/CustomRDSPolicy
Backout Plan
Using AWS Console:
Go to IAM → Roles
Select the created role → Delete role
Go to IAM → Policies → Delete custom policy if created
Go to IAM Users/Groups → Detach role or policy from users/groups
Using AWS CLI:
Detach the custom policy from user
aws iam detach-user-policy --user-name <username> --policy-arn arn:aws:iam::<account-id>:policy/CustomRDSPolicy
Delete the custom policy
aws iam delete-policy --policy-arn arn:aws:iam::<account-id>:policy/CustomRDSPolicy
Delete the role
aws iam delete-role --role-name RDSRole
References:
CIS AWS Database Services Benchmark v1.0.0, Section 2.5