aws-rds-db-instances
Retrieves AWS RDS DB instances with security governance attributes.
Syntax
Options
- profile=STRING
- Optional option. The identifier of AWS connect profile When omitted, every AWS connect profile the user may use is queried.
- region=STRING
- Optional option. AWS region Accepts a comma separated list. When omitted, every client region of the connect profile is queried.
Output fields
| Field | Type | Name | Description |
|---|---|---|---|
| aws_profile | string | Connect profile | AWS connect profile identifier |
| region | string | Region | e.g. ap-northeast-2 |
| db_instance_id | string | DB instance ID | |
| engine | string | Engine | e.g. mysql, postgres, aurora-mysql |
| engine_version | string | Engine version | |
| instance_class | string | Instance class | e.g. db.t3.medium |
| status | string | Status | e.g. available, stopped |
| storage_encrypted | bool | Storage encrypted | false = plaintext violation |
| kms_key_id | string | KMS key ID | |
| publicly_accessible | bool | Publicly accessible | true = internet exposure |
| backup_retention_period | int | Backup retention period | days; 0 = no backup |
| multi_az | bool | Multi-AZ | |
| deletion_protection | bool | Deletion protection | |
| iam_database_authentication_enabled | bool | IAM DB auth enabled | |
| enabled_cloudwatch_logs_exports | string | Enabled CloudWatch logs exports | list of log types |
| endpoint_address | string | Endpoint address | |
| endpoint_port | int | Endpoint port | |
| availability_zone | string | Availability zone | |
| vpc_id | string | VPC ID | |
| created_at | date | Created at |
Error codes
Parse errors
| Error message | Cause | Resolution |
|---|---|---|
| aws-profile-not-found | No AWS connect profile matches the name given in the profile option. | Check the name on Settings > Connect Profiles and specify it again. |
| no-permission | The account running the query is not granted the connect profile. | Ask an administrator to grant the connect profile. |
| invalid-aws-region | The region option value is not an AWS region name. | Enter an exact AWS region name such as ap-northeast-2. |
| use-one-aws-profile | More than one connect profile was given in the profile option. | Specify a single connect profile. |
Description
Retrieves AWS RDS DB instances with security governance attributes.
The following AWS IAM permissions must be allowed to use this command.
- rds:DescribeDBInstances
Without the profile and region options the command queries every client region of every connect profile the user may use, so narrowing the scope with profile and region is recommended in large environments. Each record carries the aws_profile and region fields that tell which profile and region it came from.
Examples
Example: List AWS RDS DB Instances
Situation: A periodic review or an incident investigation needs the result of list aws rds db instances.
Expected result:
| aws_profile | region | db_instance_id | engine |
|---|---|---|---|
| aws-prod | ap-northeast-2 | example-id-0123 | mysql |
Interpretation: One record is one queried item. Use aws_profile and region to tell which account and region it came from, then narrow the columns with fields and either export the result or use it as the lookup stage of a detection rule.
Example: Narrowing to one account and region
Situation: Limit the scope when several connect profiles and regions exist.
Interpretation: Narrowing the scope cuts both the number of AWS API calls and the response time. Scope every scheduled query this way.