Book Image

AWS Tools for PowerShell 6

By : Ramesh Waghmare
Book Image

AWS Tools for PowerShell 6

By: Ramesh Waghmare

Overview of this book

AWS Tools for PowerShell 6 shows you exactly how to automate all the aspects of AWS. You can take advantage of the amazing power of the cloud, yet add powerful scripts and mechanisms to perform common tasks faster than ever before. This book expands on the Amazon documentation with real-world, useful examples and production-ready scripts to automate all the aspects of your new cloud platform. It will cover topics such as managing Windows with PowerShell, setting up security services, administering database services, and deploying and managing networking. You will also explore advanced topics such as PowerShell authoring techniques, and configuring and managing storage and content delivery. By the end of this book, you will be able to use Amazon Web Services to automate and manage Windows servers. You will also have gained a good understanding of automating the AWS infrastructure using simple coding.
Table of Contents (17 chapters)

Connecting to a read replica

The process for connecting to a read replica is the same as connecting to the primary DB instance. You first need to get the endpoint. For every read replica that you create, it also gets a DNS CNAME, which is called an endpoint.

To get the endpoint for the read replica mywebappprdrr01, you use a cmdlet that we have used previously.

PS C:\> (Get-RDSDBInstance -DBInstanceIdentifier  "mywebappprdrr01").endpoint

Once you have the endpoint, hop on to the bastion server, then from there, connect using MySQL client, as follows:

# mysql -u rdsdba -prdsdba123 -h  mywebappprdrr01.cwrq5w1v98ur.us-east-1.rds.amazonaws.com --ssl-ca=rds-combined-ca-bundle.pem --ssl-verify-server-cert

In this example, we used the SSL connection method to connect to the read replica. To connect without SSL, just remove ssl-ca and ssl-verify-server-cert from the command...