Glue Connection Network Isolation
glue-connection-network-isolation
What this rule checks
Detects Glue JDBC connections without VPC subnet placement or SSL enforcement.
How to fix it
- 1Set PhysicalConnectionRequirements with SubnetId and SecurityGroupIdList
- 2Include SSL parameters in the JDBC connection URL
import { CfnConnection } from 'aws-cdk-lib/aws-glue';
new CfnConnection(this, 'JdbcConnection', {
catalogId: this.account,
connectionInput: {
name: 'analytics-db',
connectionType: 'JDBC',
connectionProperties: {
JDBC_CONNECTION_URL: 'jdbc:mysql://db.example.internal:3306/analytics',
USERNAME: 'etl_user',
PASSWORD: 'placeholder',
},
},
});import { CfnConnection } from 'aws-cdk-lib/aws-glue';
new CfnConnection(this, 'JdbcConnection', {
catalogId: this.account,
connectionInput: {
name: 'analytics-db',
connectionType: 'JDBC',
connectionProperties: {
JDBC_CONNECTION_URL:
'jdbc:mysql://db.example.internal:3306/analytics?useSSL=true',
JDBC_ENFORCE_SSL: 'true',
USERNAME: 'etl_user',
PASSWORD: 'placeholder',
},
physicalConnectionRequirements: {
subnetId: 'subnet-0abc123',
securityGroupIdList: ['sg-0def456'],
availabilityZone: 'us-east-1a',
},
},
});CDK Insights pinpoints the exact file and line in your CDK source for every finding, so you can jump straight to the fix.
Affected resource types
AWS::Glue::ConnectionIntentional? Suppress this finding
Sometimes a flag is deliberate β a genuinely public endpoint, say. You can dismiss glue-connection-network-isolation and the reason is kept in the report, not silently hidden.
In .cdk-insights.json:
{
"ignoreRules": [
{ "id": "glue-connection-network-isolation", "reason": "Why this is intentional" }
]
}Or inline in your CDK code:
Validations.of(scope).acknowledge({
id: 'cdk-insights::glue-connection-network-isolation',
reason: 'Why this is intentional',
});Use the rule ID glue-connection-network-isolation shown above β not the CDK-* ID from SARIF / GitHub code scanning. To dismiss every finding on one construct instead, use ignorePaths. Suppression docs β
Catch this in your stack
$ npx cdk-insights scanCDK Insights runs this and 118+ other rules locally against your synthesised CDK app β free, no account, your code never leaves your machine.