could not connect to aws instance code example
Example: could not connect to aws instance
Go to your instance and press on it
go to Connectivity & security
press on one of the VPC security groups(if not have, add the default on modify)
press on the Security group ID of your security group
go to Inbound rules
press on the Edit inbound rules
press on Add rule
fill the next fields:
type: PostgreSQL or All traffic(less secure)
Protocol: TCP or ALL
Port range: 5432 or All
Sourse: Custom
on the Magnifying Glass Icon: 0.0.0.0/0
press Save rules
And its work :)
if not add the same rule but change the Magnifying Glass Icon to: ::/0
And hopefully its work this time