|
| 1 | +--- |
| 2 | +title: "Steampipe Table: aws_inspector2_organization_configuration - Query AWS Inspector2 Regional Organization Configuration using SQL" |
| 3 | +description: "Allows users to query AWS Inspector2 regional organization configuration, including auto-enable settings for scan types and account limit status per region." |
| 4 | +folder: "Inspector2" |
| 5 | +--- |
| 6 | + |
| 7 | +# Table: aws_inspector2_organization_configuration - Query AWS Inspector2 Regional Organization Configuration using SQL |
| 8 | + |
| 9 | +The AWS Inspector2 Regional Organization Configuration contains settings that determine which scan types are automatically enabled for new members of your organization within a specific region and whether the organization has reached its account limit. These configurations help manage the security posture across your AWS organization on a regional basis. |
| 10 | + |
| 11 | +## Table Usage Guide |
| 12 | + |
| 13 | +The `aws_inspector2_organization_configuration` table in Steampipe provides you with information about the regional organization configuration of Amazon Inspector2. This table allows you, as a cloud administrator, security team member, or compliance officer, to query regional organization settings, including which scan types are automatically enabled for new members and whether the organization has reached its account limit. You can utilize this table to gather insights on regional organization configuration, such as EC2, ECR, Lambda, and Lambda Code scan auto-enablement status, account limit status, and region information. The schema outlines the various attributes of the regional organization configuration for you, including the region, scan type auto-enablement settings, and account limit status. |
| 14 | + |
| 15 | +**Important Notes** |
| 16 | +- To query this table, the account must be registered as the delegated administrator. For more details, see: https://docs.aws.amazon.com/inspector/latest/user/admin-member-relationship.html |
| 17 | + |
| 18 | +## Examples |
| 19 | + |
| 20 | +### Basic info |
| 21 | +Analyze the regional organization configuration to understand which scan types are automatically enabled for new members and whether the organization has reached its account limit. This is useful for ensuring your security posture is properly configured across regions. |
| 22 | + |
| 23 | +```sql+postgres |
| 24 | +select |
| 25 | + region, |
| 26 | + ec2_auto_enable, |
| 27 | + ecr_auto_enable, |
| 28 | + lambda_auto_enable, |
| 29 | + lambda_code_auto_enable, |
| 30 | + max_account_limit_reached, |
| 31 | + title |
| 32 | +from |
| 33 | + aws_inspector2_organization_configuration; |
| 34 | +``` |
| 35 | + |
| 36 | +```sql+sqlite |
| 37 | +select |
| 38 | + region, |
| 39 | + ec2_auto_enable, |
| 40 | + ecr_auto_enable, |
| 41 | + lambda_auto_enable, |
| 42 | + lambda_code_auto_enable, |
| 43 | + max_account_limit_reached, |
| 44 | + title |
| 45 | +from |
| 46 | + aws_inspector2_organization_configuration; |
| 47 | +``` |
| 48 | + |
| 49 | +### List regions with scan type auto-enablement settings |
| 50 | +Identify which scan types are automatically enabled for new members of your organization across all regions. This helps in understanding the default security posture for new accounts. |
| 51 | + |
| 52 | +```sql+postgres |
| 53 | +select |
| 54 | + region, |
| 55 | + ec2_auto_enable, |
| 56 | + ecr_auto_enable, |
| 57 | + lambda_auto_enable, |
| 58 | + lambda_code_auto_enable |
| 59 | +from |
| 60 | + aws_inspector2_organization_configuration; |
| 61 | +``` |
| 62 | + |
| 63 | +```sql+sqlite |
| 64 | +select |
| 65 | + region, |
| 66 | + ec2_auto_enable, |
| 67 | + ecr_auto_enable, |
| 68 | + lambda_auto_enable, |
| 69 | + lambda_code_auto_enable |
| 70 | +from |
| 71 | + aws_inspector2_organization_configuration; |
| 72 | +``` |
| 73 | + |
| 74 | +### List regions with organization account limit status |
| 75 | +Determine whether your organization has reached the maximum AWS account limit for Amazon Inspector across all regions. This is important for capacity planning and understanding organizational constraints. |
| 76 | + |
| 77 | +```sql+postgres |
| 78 | +select |
| 79 | + region, |
| 80 | + max_account_limit_reached, |
| 81 | + case |
| 82 | + when max_account_limit_reached then 'Organization has reached maximum account limit' |
| 83 | + else 'Organization can add more accounts' |
| 84 | + end as limit_status |
| 85 | +from |
| 86 | + aws_inspector2_organization_configuration; |
| 87 | +``` |
| 88 | + |
| 89 | +```sql+sqlite |
| 90 | +select |
| 91 | + region, |
| 92 | + max_account_limit_reached, |
| 93 | + case |
| 94 | + when max_account_limit_reached then 'Organization has reached maximum account limit' |
| 95 | + else 'Organization can add more accounts' |
| 96 | + end as limit_status |
| 97 | +from |
| 98 | + aws_inspector2_organization_configuration; |
| 99 | +``` |
| 100 | + |
| 101 | +### List regions with comprehensive scan type coverage |
| 102 | +Identify regions that have all scan types (EC2, ECR, Lambda, and Lambda Code) automatically enabled for new members. This indicates a comprehensive security posture across regions. |
| 103 | + |
| 104 | +```sql+postgres |
| 105 | +select |
| 106 | + region, |
| 107 | + ec2_auto_enable, |
| 108 | + ecr_auto_enable, |
| 109 | + lambda_auto_enable, |
| 110 | + lambda_code_auto_enable, |
| 111 | + case |
| 112 | + when ec2_auto_enable |
| 113 | + and ecr_auto_enable |
| 114 | + and lambda_auto_enable |
| 115 | + and lambda_code_auto_enable |
| 116 | + then 'All scan types enabled' |
| 117 | + else 'Some scan types disabled' |
| 118 | + end as scan_coverage |
| 119 | +from |
| 120 | + aws_inspector2_organization_configuration; |
| 121 | +``` |
| 122 | + |
| 123 | +```sql+sqlite |
| 124 | +select |
| 125 | + region, |
| 126 | + ec2_auto_enable, |
| 127 | + ecr_auto_enable, |
| 128 | + lambda_auto_enable, |
| 129 | + lambda_code_auto_enable, |
| 130 | + case |
| 131 | + when ec2_auto_enable |
| 132 | + and ecr_auto_enable |
| 133 | + and lambda_auto_enable |
| 134 | + and lambda_code_auto_enable |
| 135 | + then 'All scan types enabled' |
| 136 | + else 'Some scan types disabled' |
| 137 | + end as scan_coverage |
| 138 | +from |
| 139 | + aws_inspector2_organization_configuration; |
| 140 | +``` |
| 141 | + |
| 142 | +### List regions with EC2 scan auto-enablement status |
| 143 | +Focus specifically on EC2 scan configuration to understand if EC2 scans are automatically enabled for new members across regions. |
| 144 | + |
| 145 | +```sql+postgres |
| 146 | +select |
| 147 | + region, |
| 148 | + ec2_auto_enable, |
| 149 | + case |
| 150 | + when ec2_auto_enable then 'EC2 scans are auto-enabled' |
| 151 | + else 'EC2 scans are not auto-enabled' |
| 152 | + end as ec2_status |
| 153 | +from |
| 154 | + aws_inspector2_organization_configuration; |
| 155 | +``` |
| 156 | + |
| 157 | +```sql+sqlite |
| 158 | +select |
| 159 | + region, |
| 160 | + ec2_auto_enable, |
| 161 | + case |
| 162 | + when ec2_auto_enable then 'EC2 scans are auto-enabled' |
| 163 | + else 'EC2 scans are not auto-enabled' |
| 164 | + end as ec2_status |
| 165 | +from |
| 166 | + aws_inspector2_organization_configuration; |
| 167 | +``` |
| 168 | + |
| 169 | +### List regions with ECR scan auto-enablement status |
| 170 | +Focus specifically on ECR scan configuration to understand if ECR scans are automatically enabled for new members across regions. |
| 171 | + |
| 172 | +```sql+postgres |
| 173 | +select |
| 174 | + region, |
| 175 | + ecr_auto_enable, |
| 176 | + case |
| 177 | + when ecr_auto_enable then 'ECR scans are auto-enabled' |
| 178 | + else 'ECR scans are not auto-enabled' |
| 179 | + end as ecr_status |
| 180 | +from |
| 181 | + aws_inspector2_organization_configuration; |
| 182 | +``` |
| 183 | + |
| 184 | +```sql+sqlite |
| 185 | +select |
| 186 | + region, |
| 187 | + ecr_auto_enable, |
| 188 | + case |
| 189 | + when ecr_auto_enable then 'ECR scans are auto-enabled' |
| 190 | + else 'ECR scans are not auto-enabled' |
| 191 | + end as ecr_status |
| 192 | +from |
| 193 | + aws_inspector2_organization_configuration; |
| 194 | +``` |
| 195 | + |
| 196 | +### List regions with Lambda scan auto-enablement status |
| 197 | +Focus specifically on Lambda scan configuration to understand if Lambda scans are automatically enabled for new members across regions. |
| 198 | + |
| 199 | +```sql+postgres |
| 200 | +select |
| 201 | + region, |
| 202 | + lambda_auto_enable, |
| 203 | + lambda_code_auto_enable, |
| 204 | + case |
| 205 | + when lambda_auto_enable and lambda_code_auto_enable |
| 206 | + then 'Both Lambda and Lambda Code scans are enabled' |
| 207 | + when lambda_auto_enable |
| 208 | + then 'Only Lambda scans are enabled' |
| 209 | + when lambda_code_auto_enable |
| 210 | + then 'Only Lambda Code scans are enabled' |
| 211 | + else 'No Lambda scans are enabled' |
| 212 | + end as lambda_scan_status |
| 213 | +from |
| 214 | + aws_inspector2_organization_configuration; |
| 215 | +``` |
| 216 | + |
| 217 | +```sql+sqlite |
| 218 | +select |
| 219 | + region, |
| 220 | + lambda_auto_enable, |
| 221 | + lambda_code_auto_enable, |
| 222 | + case |
| 223 | + when lambda_auto_enable and lambda_code_auto_enable |
| 224 | + then 'Both Lambda and Lambda Code scans are enabled' |
| 225 | + when lambda_auto_enable |
| 226 | + then 'Only Lambda scans are enabled' |
| 227 | + when lambda_code_auto_enable |
| 228 | + then 'Only Lambda Code scans are enabled' |
| 229 | + else 'No Lambda scans are enabled' |
| 230 | + end as lambda_scan_status |
| 231 | +from |
| 232 | + aws_inspector2_organization_configuration; |
| 233 | +``` |
| 234 | + |
| 235 | +### List complete regional organization configurations |
| 236 | +Retrieve the complete organization configuration including all auto-enable settings and account limit status for comprehensive analysis across all regions. |
| 237 | + |
| 238 | +```sql+postgres |
| 239 | +select |
| 240 | + region, |
| 241 | + ec2_auto_enable, |
| 242 | + ecr_auto_enable, |
| 243 | + lambda_auto_enable, |
| 244 | + lambda_code_auto_enable, |
| 245 | + max_account_limit_reached, |
| 246 | + title |
| 247 | +from |
| 248 | + aws_inspector2_organization_configuration; |
| 249 | +``` |
| 250 | + |
| 251 | +```sql+sqlite |
| 252 | +select |
| 253 | + region, |
| 254 | + ec2_auto_enable, |
| 255 | + ecr_auto_enable, |
| 256 | + lambda_auto_enable, |
| 257 | + lambda_code_auto_enable, |
| 258 | + max_account_limit_reached, |
| 259 | + title |
| 260 | +from |
| 261 | + aws_inspector2_organization_configuration; |
| 262 | +``` |
0 commit comments