An AWS Glue job must read tables from a PostgreSQL database in a VPC. What must be set up for the job to reach it?
- Exam domain
- Data Ingestion and Transformation34% of the exam
- Difficulty
- Medium
- In this mock
- 33 questions on this domainPractise this domain
Why the exam asks this
Task Statement 1.2: Transform and process data.
Objective in the exam guide: Connect to different data sources (for example, JDBC, ODBC); create new source or target connections for cataloging.
Operational databases are the most common ETL source. Connecting to them securely, inside a VPC, is everyday data engineering.
Why D is the answer
A Glue connection that uses the JDBC URL, with network settings for the VPC and credentials from Secrets Manager
Glue connections hold the JDBC URL, VPC network settings and credentials needed to reach databases.
Remember: Databases from Glue: a Glue connection with JDBC, VPC settings and credentials.
How it works
AWS Glue connects to databases through connections that store a JDBC URL, network settings and credentials.
For a database in a VPC, the connection specifies the subnet and security group, so Glue runs inside the network.
Crawlers and jobs can both use the connection.
Clues in the question
The words that point to the answer, and what each one tells you.
- PostgreSQL database in a VPC
- JDBC plus VPC networking.
In detail
- The same connection can let a crawler catalog the database's tables.
- The database security group must allow the Glue job's traffic.
Side by side with look-alikes
| Piece | Purpose |
|---|---|
| JDBC URL | Where the database is |
| VPC subnet and security group | Network path |
| Secrets Manager credentials | How to log in |
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. An S3 bucket policyWrongMost tempting
Bucket policies control S3 access, not database connections.
Why it tempts: Access policies are part of most connectivity problems. But a bucket policy controls S3, not database connections.
B. A Kinesis data streamWrong
A stream is not a database connection.
C. An Athena workgroupWrong
Athena workgroups manage queries, not Glue connections.
D. A Glue connection that uses the JDBC URL, with network settings for the VPC and credentials from Secrets ManagerRight
Databases from Glue: a Glue connection with JDBC, VPC settings and credentials.
In practice
- Test the connection before scheduling jobs that depend on it.
Use case
An illustrative scenario, not a real incident.
A team creates one Glue connection to its PostgreSQL database and uses it for both the crawler and the ETL job.
See how it works
flowchart LR G["Glue job"] --> C["Glue connection: JDBC URL"] C --> V["VPC subnet and security group"] V --> D["PostgreSQL database"] S["Secrets Manager"] -.-> C
How to read this chart
- "Glue job" leads to "Glue connection: JDBC URL".
- "Glue connection: JDBC URL" leads to "VPC subnet and security group".
- "VPC subnet and security group" leads to "PostgreSQL database".
- "Secrets Manager" leads to "Glue connection: JDBC URL".