Difference between revisions of "Aws rds"

From Wasya Wiki
Jump to: navigation, search
(Created page with " <pre> aws rds create-db-instance \ --engine sqlserver-se \ --db-instance-identifier mymsftsqlserver \ --allocated-storage 250 \ --db-instance-class db.t3.larg...")
 
(develop)
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
 +
 +
* From: https://www.howtoforge.com/how-to-manage-aws-rds-instance-using-aws-cli/
 +
 +
= setup =
 +
 +
  aws ec2 create-default-vpc --profile rds_driver_1
 +
  aws ec2 create-default-subnet --availability-zone us-east-1a --profile rds_driver_1
 +
 +
= develop =
 +
 +
 +
  aws rds describe-db-instances --profile rds_driver_1
 +
  aws rds describe-db-snapshots
 +
  aws rds describe-db-clusters
 +
 +
== Create ==
  
 
<pre>
 
<pre>
aws rds create-db-instance \
+
aws rds create-db-instance --db-instance-identifier $dbname \
    --engine sqlserver-se \
+
  --db-instance-class db.t3.micro \
    --db-instance-identifier mymsftsqlserver \
+
  --engine mysql \
    --allocated-storage 250 \
+
  --master-username $dbuser \
    --db-instance-class db.t3.large \
+
  --master-user-password $dbpasswd \
    --vpc-security-group-ids mysecuritygroup \
+
  --allocated-storage 5 \
    --db-subnet-group mydbsubnetgroup \
+
  --profile rds_driver_1
    --master-username masterawsuser \
+
    --manage-master-user-password \
+
    --backup-retention-period 3
+
 
</pre>
 
</pre>

Latest revision as of 03:35, 31 March 2024


setup

 aws ec2 create-default-vpc --profile rds_driver_1
 aws ec2 create-default-subnet --availability-zone us-east-1a --profile rds_driver_1

develop

 aws rds describe-db-instances --profile rds_driver_1
 aws rds describe-db-snapshots
 aws rds describe-db-clusters

Create

aws rds create-db-instance --db-instance-identifier $dbname \
  --db-instance-class db.t3.micro \
  --engine mysql \
  --master-username $dbuser \
  --master-user-password $dbpasswd \
  --allocated-storage 5 \
  --profile rds_driver_1