EC2-based ingestion workers cannot connect to an RDS PostgreSQL database. Worker outbound rules allow the connection, but the database security group has no inbound rules. Which change allows access only from workers associated with their security group?
Show the answer
Correct answerA. Allow inbound TCP 5432 from the worker security group.
AWhy this is right: PostgreSQL uses TCP 5432 by default, and the source security group restricts access to associated worker interfaces.
BWhy not this: An outbound database rule does not authorize connections initiated by the workers.
CWhy not this: A subnet CIDR permits other resources in the subnet, not just resources associated with the worker security group.
DWhy not this: TCP 443 is normally used for HTTPS, not the database's PostgreSQL listener.
An inbound rule referencing the worker security group permits PostgreSQL connections from network interfaces associated with that group. Allowing the entire subnet would also permit connections from other resources in that subnet.