01 Find the ID of the data-tier security group available within your AWS account by following the instructions outlined in this conformity rule.
02 Sign in to your Cloud Conformity console, access Use Data-Tier Security Group for RDS Databases conformity rule settings and identify the tag set defined for AWS resources available in your data tier (e.g. <data_tier_tag>:<data_tier_tag_value>).
03 Run describe-db-instances command (OSX/Linux/UNIX) using custom query filters to list the Amazon Resource Names (ARNs) of all AWS RDS database instances provisioned in the selected region:
aws rds describe-db-instances
--region us-east-1
--query 'DBInstances[*].DBInstanceArn'
04 The command output should return a list with the requested ARNs:
[
"arn:aws:rds:us-west-2:123456789012:db:cc-project5-database",
"arn:aws:rds:us-west-2:123456789012:db:cc-sql-srv-database",
"arn:aws:rds:us-west-2:123456789012:db:cc-staging-database"
]
05 Run list-tags-for-resource command (OSX/Linux/UNIX) using the ARN of the database instance that you want to examine as parameter and custom query filters to describe the tags defined for the selected AWS RDS resource:
aws rds list-tags-for-resource
--region us-east-1
--resource-name arn:aws:rds:us-west-2:123456789012:db:cc-project5-database
--query 'TagList[*].{Value:Value, Key:Key}'
06 The command request should return one of the following outputs:
- If the describe-tags command output returns an empty array (i.e. []), as shown in the example below, the verified database instance is not tagged, therefore the audit process for the selected resource stops here:
- If the command output returns a set of tags that is different than the one copied at step no. 2, as shown in the example below, the verified instance does not belong to your data tier, hence the audit process for the selected resource stops here:
[
{
"Key": "Workload",
"Value": "MySqlDB"
}
]
07 If the describe-tags command output returns a set of tags that match the one copied at step no. 2 (e.g. :), as shown in the example below, the verified Amazon RDS database instance is tagged as a data-tier resource, therefore the audit process continues with the next step:
[
{
"Key": "<data_tier_tag>",
"Value": "<data_tier_tag_value>"
}
]
08 Execute describe-db-instances command (OSX/Linux/UNIX) using the ARN of the data-tier RDS instance that you want to examine as identifier and custom query filters to return the information about the security group associated with the selected database instance:
aws rds describe-db-instances
--region us-east-1
--db-instance-identifier arn:aws:rds:us-west-2:123456789012:db:cc-project5-database
--query "DBInstances[*].VpcSecurityGroups[]"
Compare the assigned security group ID, returned at the previous step as value for the
VpcSecurityGroupId attribute, with the ID of the data-tier group identified at step no. 1. If these two identifiers do not match, the data-tier security group is not associated with the selected data-tier AWS RDS instance.
09 Repeat steps no. 5 – 8 to check other data-tier RDS instances, available in the selected region, for association with the data-tier security group.
10 If required, change the AWS region by updating the --region command parameter value and repeat steps no. 2 – 9 to perform the audit process for other regions.