Database Tier Access Test

Database Tier Access Test

  1. In the Outputs tab of the cfn-aws-three-tier-demo stack, check the MySQLDatabaseEndpointAddress value.
    • Note this value.

AWS CloudFormation

  1. Leave the SSH session of the Web Tier instance with the exit command to return to the Bastion Host.
    • The Bastion Host has the MySQL client (mariadb105) installed, and the Database Security Group allows connections from the Bastion Host.

    • Connect to the database with the following command and enter the MasterUserPassword value when prompted for the password:

      exit
      mysql -h <MySQLDatabaseEndpointAddress> -u <MasterUsername> -p
      

AWS CloudFormation

After connecting successfully, run the following commands to list the databases and exit:

SHOW DATABASES;
exit

AWS CloudFormation

  1. On the Bastion Host, check the TCP connection to port 3306 of the database:

    nping -p 3306 <MySQLDatabaseEndpointAddress>
    

AWS CloudFormation

  1. Open RDS.
    • Choose Databases.
    • Select the demo-database database.

AWS CloudFormation

  1. In the Connectivity & security tab, choose Endpoint and check the networking section of the database (subnet group and security group).

AWS CloudFormation

  1. Check the Multi-AZ configuration of the database.

AWS CloudFormation