Powershell AWS Automation Management (7)-RDS

Source: Internet
Author: User

Continue the Bean's PowerShell AWS tour. This section looks at how to manage RDS for relational databases.


The operation of the image interface can be referenced

http://beanxyz.blog.51cto.com/5570417/1531843


First look at how to create an instance of MARIADB. The parameters of this command are particularly large, and they are basically not remembered. Here beans trickery creates an instance from the image interface and then obtains the corresponding property name through the Get-rdsdbinstance view


New-rdsdbinstance-allocatedstorage 5-dbinstanceidentifier "testdb1"-masterusername "beanxyz"-MasterUserPassword " Password "'-autominorversionupgrade $true-availabilityzone" ap-southeast-2c "-copytagstosnapshot $false- Dbinstanceclass "Db.t2.small" '-dbname "testdb1"-engine "mariadb" get-rdsdbinstance


650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/84/19/wKiom1eFsHry9iiiAACBvPVJlRg843.png "title=" 1.PNG " alt= "Wkiom1efshry9iiiaacbvpvjlrg843.png"/>

Wait a 10 minutes to see the successful creation

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M02/84/19/wKiom1eFsEXguePvAAA8LeTodq0163.png-wh_500x0-wm_3 -wmp_4-s_429728358.png "style=" Float:none; "title=" 2.PNG "alt=" Wkiom1efsexguepvaaa8letodq0163.png-wh_50 "/>

If you need to delete, you can use the Remove-rdsdbinstance command.

Remove-rdsdbinstance-dbinstanceidentifier "TESTDB1"-skipfinalsnapshot $true


As with EC2, RDS also needs to configure security groups. In the image interface can specify the source for other security groups, but the command line I did not find the corresponding parameters, can only be used to replace the IP address.


Next I get the default security group (the security group where my EC2 virtual machine resides) is bound to the IP range, and then add the allowed access scope to him.

$cidrblock = (get-ec2securitygroup-groupname default |get-ec2vpc). Cidrblock$ip1=new-object Amazon.ec2.model.ippermission$ip1. Ipprotocol= "TCP" $ip 1. Fromport= "3306" $ip 1. Toport= "3306" $ip 1. iprange= $cidrblockGrant-ec2securitygroupingress-groupname default-ippermission @ ($ip 1)


Configuration of security groups

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/84/19/wKiom1eFsjjhmJY2AABI9C9reeY614.png "title=" 5.PNG " alt= "Wkiom1efsjjhmjy2aabi9c9reey614.png"/>

Next, do a simple test.

Beans directly created a CentOS 7 server, after installing MARIADB, connect to the endpoint of my RDS instance to see

Connection Successful

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/84/19/wKiom1eFsAuSTHNQAAA8-IM8uXY046.png "style=" float: none; "title=" 3.PNG "alt=" Wkiom1efsausthnqaaa8-im8uxy046.png "/>


View Database


650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/84/18/wKioL1eFsA2i0Cn5AAAeHJSqVjo530.png "style=" float: none; "title=" 4.PNG "alt=" Wkiol1efsa2i0cn5aaaehjsqvjo530.png "/>


See how PowerShell CDN is configured in the next article


This article is from the "Mapo Tofu" blog, please be sure to keep this source http://beanxyz.blog.51cto.com/5570417/1825987

Powershell AWS Automation Management (7)-RDS

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.