Question: I am having a hard time figuring out how to give an ec2 instance access to an RDS instance in order to perform a mysqldump.

Do I need to add a security group that allows the ec2 instance access to that server? I tried this using the RDS endpoint and it would not allow.

Answer: 
To access an Amazon EC2 instance with your own domain name, use a DNS server (eg Amazon Route 53) to point your domain name to the IP address of the EC2 instance.

The steps are:

* Create an Elastic IP address in the EC2 management console. This is a static IP address that you can then control.
* Assign the Elastic IP address to your EC2 instance
* Choose a DNS provider (either your own, or Amazon Route 53)
* Purchase your domain name (in case you don't already own it), eg `example.com`
* Create a subdomain (eg `server1.example.com`
* Create an `A` record in the DNS system to point to the Elastic IP address

You can then access your instance via `server1.example.com`.

See also: [Routing Queries to an Amazon EC2 Instance](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-to-ec2-instance.html)
You can't change it as it depends upon ec2 servers **Private and Public IP**. Although you can change the public and private IP.