A Glue job running in a VPC times out connecting to an Amazon RDS database in the same VPC. Credentials are correct. What should the engineer check?
- Exam domain
- Data Security and Governance18% of the exam
- Difficulty
- Medium
- In this mock
- 19 questions on this domainPractise this domain
Why the exam asks this
Task Statement 4.1: Apply authentication mechanisms.
Objective in the exam guide: Update VPC security groups.
Network rules are the most common reason pipelines cannot reach databases. Knowing to check security groups first saves hours.
Why A is the answer
That the database's security group allows inbound traffic on its port from the Glue job's security group
A connection timeout inside a VPC usually means a security group is blocking the traffic.
Remember: Timeouts inside a VPC: check the security group rules first.
How it works
Security groups act as virtual firewalls for resources in a VPC.
For a Glue job to reach a database, the database's security group must allow inbound traffic on the database port from the job's security group.
A blocked connection usually shows up as a timeout, not an authentication error.
Clues in the question
The words that point to the answer, and what each one tells you.
- Times out
- Traffic is blocked, not rejected for credentials.
- Credentials are correct
- The problem is network access.
In detail
- Security groups are stateful: allowing inbound on the database lets responses return.
- Glue connections in a VPC need a security group with a self-referencing rule as well.
Side by side with look-alikes
| Symptom | Likely cause |
|---|---|
| Connection timeout | Security group or routing |
| Authentication failed | Wrong credentials |
| Access denied on S3 | IAM or bucket policy |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. That the database's security group allows inbound traffic on its port from the Glue job's security groupRight
Timeouts inside a VPC: check the security group rules first.
B. The S3 bucket policyWrongMost tempting
Bucket policies do not affect database connections.
Why it tempts: Policies are often behind access errors. But a bucket policy has nothing to do with reaching a database.
C. The Redshift distribution styleWrong
Distribution style is a Redshift performance setting.
D. The CloudWatch log retentionWrong
Log retention does not block traffic.
In practice
- Reference security groups, not IP ranges, for traffic between AWS resources.
Use case
An illustrative scenario, not a real incident.
Adding an inbound rule on port 5432 from the Glue security group fixes the timeout immediately.
See how it works
flowchart LR G["Glue job, security group sg-glue"] -->|"port 5432"| R["RDS, security group sg-db"] RULE["sg-db inbound: 5432 from sg-glue"] -.-> R
How to read this chart
- At "Glue job, security group sg-glue": if "port 5432", go to "RDS, security group sg-db".
- "sg-db inbound: 5432 from sg-glue" leads to "RDS, security group sg-db".