AWS RDS for Private Connectivity
- Lets create rds in a vpc which is not publically accesible
- Lets create a windows instance in one subnet and try to access rds over private ip/dns
- Login into the windows server and to test the connectivity with mysql rds instance, lets launch powershell as admin and
- install chocolatey Refer Here
- install mysql workbench Refer Here
- Now lets try connecting from this server
SSH Tunneling Connection
- Consider the below architecture
- Connecting from on-premise system to mysql rds is not possible directly as rds is private
- Now if your admins want to login into rds to do some maintenace
- option 1: Keep one server in AWS VPC dedicated for connecting to mysql
- option 2: Create a tunneling connection using any public ec2 instance in the same vpc
- Now lets create an rds with private accesibility
- Now lets create a linux ec2 instance with public accesiblity in the same vpc
Database Instance Classes and Types
- This determinse the cpu and memory of AWS RDS instance. Refer Here
- We have 3 instance classes
- Standard
- Memory Optimized
- Burstable
DB Instance Storage
- AWS RDS provides three storage types
- General Purpose SSD (gp2)
- Provisioned IOPS SSD (io1)
- Magnetic (standard)
- In AWS We can create upto 64 TiB of storage for MySQL, Maria db, Oracle and Postgres and 16 TiB of Storage for Microsoft SQL Server.
DB Instance Billing
- We have two kinds of DB Instances
- On-Demand db instances:
- Create and delete db whenever you want
- Preferred for dev, test environments
- Cost is high
- Reservered db instances
- Giving a commitment to amazon for 1 year or 3 year of db usage
- Preferred for production environments
- Cost will be at a discounted price
- On-Demand db instances:
- Lets create an estimate of mysql server with 4 vcpu and 16 Gb of RAM with 4 TB of instance storage
- On-demand:
- Reserved 1 years no upfront:
- Reserverd 3 years partial upfront
- Reserved 3 years all upfront
- On-demand:
- If we observe the RDS cost will also have storage costs
- disk costs
- backup costs
Next Step
- Which instance class or type should be chosen
- Factors that affect storage performance or which storage type should be used.
- Read Replications of databases.