Skill 50 · Connecting To Data Source
Subchapter 50.5
references/network-setup.mdMarkdown4 KBView on GitHub
VPC, subnet, and security group configuration for Glue connections to private data sources. Skip this reference if the source is reachable over the public internet (Snowflake default, BigQuery, public RDS).
Required:
Not required:
The Glue connection’s SubnetId determines where Glue provisions ENIs at job runtime. Constraints:
AvailabilityZone in PhysicalConnectionRequirements MUST match the subnet’s AZMatch AZ to source for lower latency:
aws rds describe-db-instances --db-instance-identifier <ID> \
--query 'DBInstances[0].AvailabilityZone'Two security groups are involved: Glue’s and the source’s.
Glue security group (outbound):
Source security group (inbound):
Verify:
aws ec2 describe-security-groups --group-ids <glue-sg> \
--query 'SecurityGroups[0].IpPermissionsEgress'
aws ec2 describe-security-groups --group-ids <source-sg> \
--query 'SecurityGroups[0].IpPermissions'Glue jobs read their scripts from S3 and write results to S3. The Glue subnet MUST have either a NAT gateway or an S3 VPC gateway endpoint; endpoint is preferred (no NAT costs, stays on AWS backbone).
Check:
aws ec2 describe-vpc-endpoints \
--filters Name=vpc-id,Values=<VPC_ID> Name=service-name,Values=com.amazonaws.<region>.s3Create if missing:
aws ec2 create-vpc-endpoint \
--vpc-id <VPC_ID> \
--service-name com.amazonaws.<region>.s3 \
--route-table-ids <RTB_ID>Without this, Glue jobs fail at startup with UnableToFindVpcEndpoint.
Required if:
Not required if:
NAT gateway costs per-hour plus per-GB processed. For pure private-VPC ETL with S3 endpoint, omit it.
Peered VPCs: Glue subnet’s route table MUST have a route to the source VPC’s CIDR via the peering connection. Both VPCs must be in the same region.
Transit Gateway: Route tables in both VPCs attached to the TGW MUST have routes to each other’s CIDR.
On-premises via VPN/Direct Connect: Route table for Glue subnet MUST have a route to on-prem CIDR via virtual private gateway (VPN) or transit gateway (DX). Source firewall must allow inbound from Glue’s ENI IPs (which change per-job – use subnet CIDR).
Test reachability from an EC2 instance in the same subnet before creating the Glue connection:
# From EC2 in Glue's intended subnet
telnet <source-host> <source-port>If EC2 can’t reach the source, neither will Glue. Fix routing first.