I have a VPC with public & private subnets (Windows 2019). I installed Postgres database (not RDS) manually in the private instance. As recommended by AWS I have created all the security group rules in public & private instance security groups. I wasn't able to connect to the DB from public instance. Please advise. Thanks.
Public instance security group:
- HTTP TCP 80 0.0.0.0/0 -
- PostgreSQL TCP 5432 0.0.0.0/0
- RDP TCP 3389 0.0.0.0/0 -
- HTTPS TCP 443 0.0.0.0/0
Outbound:
- PostgreSQL TCP 5432 sg-0f189eca6a0f783dd (PRIVATE-SG)
Private instance security group:
- PostgreSQL TCP 5432 sg-008ffcfcdec814a91 (PUBLIC-SG)
- RDP TCP 3389 sg-008ffcfcdec814a91 (PUBLIC-SG)