You are a developer for a company that is planning on using the AWS RDS service.
Your Database administrator spins up a new MySQL RDS Instance in AWS.
You now need to connect to that instance.
How can you achieve this? Choose 2 answers from the options given below.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - A and C.
The AWS Documentation mentions the following.
Before you can connect to a DB instance running the MySQL database engine, you must create a DB instance.
For information, see Creating a DB Instance Running the MySQL Database Engine.
Once Amazon RDS provisions your DB instance, you can use any standard MySQL client application or utility to connect to the instance.
In the connection string, you specify the DNS address from the DB instance endpoint as the host parameter and specify the port number from the DB instance endpoint as the port parameter.
You can use the AWS Management Console, the AWS CLI describe-db-instances command, or the Amazon RDS API DescribeDBInstances action to list the details of an Amazon RDS DB instance, including its endpoint.
Options B and D are incorrect since even the endpoints resolve to IP addresses and the IP addresses can be used to connect to the database, this is not a recommended option because the underlying IP address could change during failover.
For more information on connecting to a database endpoint, please refer to the below URL-
https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ConnectToInstance.htmlTo connect to a new MySQL RDS Instance in AWS, you can use the following two methods:
To get the endpoint for the RDS instance, you can use the following AWS CLI command:
sqlaws rds describe-db-instances --db-instance-identifier <your-db-instance-id>
Replace <your-db-instance-id>
with the ID of the newly created RDS instance.
Alternatively, you can also request the IP address of the instance from the Database Administrator. However, it is generally recommended to use the endpoint URL instead of the IP address, as the IP address may change over time, while the endpoint URL remains the same.
In summary, to connect to a newly created MySQL RDS Instance in AWS, you can either use the DescribeDBInstances API to get the endpoint URL or request the endpoint URL from the Database Administrator.