Provided that EC2 and RDS are on the same VPC, is there an internal endpoint we need to use to speed up data exchange between the two?
Similar to how if MySQL + Apache are on 1 server we would connect using ‘localhost’ (avoiding TCP/IP).
Provided that EC2 and RDS are on the same VPC, is there an internal endpoint we need to use to speed up data exchange between the two?
Similar to how if MySQL + Apache are on 1 server we would connect using ‘localhost’ (avoiding TCP/IP).
2
Answers
EC2 and RDS are not running on the same server, so
localhost
would not work. A VPC is still a network, and you would still use TCP inside that network to connect from one server to the other.If you are creating the RDS instance in the same VPC as your other EC2 and lambda resources, you could directly connect with the ENI elastic network interface, by specifying the ingress security group rule in RDS DB from the EC2 Security group. Other ways of authentication that you get at the time of database instance provisioning are