Hosting Databases in AWS
- To host Database engines in AWS we have two options
- Hosting the Database on Amazon EC2 Servers
- Hosting the Database on Amazon RDS
Hosting the Database on Amazon EC2 Servers

- You should choose ec2 if
- you need full control over the database instances
- You need OS access
- You need full controlover backups, replications & clustering
- Your RDBMS engine features and options are not available in RDS
- To Create Database from EC2 instances
- Option 1: Take a plain os like ubuntu, redhat, windows and install the db engine
- Option 2: There are third party vendors who provide the pre installed database for you

Hosting the Database using Amazon RDS

- You can choose this model if
- You want focus on tasks that bring value to your business
- you dont want to manage the database (backups etc)
- You wnat to focus on high-level tuning tasks and schema optimizations
- You lack in-house expertise to manage databases
- You want automated backup and recovery
- You want multi-az/region replication
- Amazon RDS supports the following Database Engines
- Microsoft SQL Server
- Oracle
- Postgres
- mySql
- maria db
- Aurora for mySql
- Aurora for postgres
- Not all the versions are available.
- mysql versions

- Similarly explore other engine versions
- mysql versions
Understand RDS creation
- Lets first try to understand about aws network (vpc)

- Now when we create a rds instance should we give one az or more that az
- Should i have some kind of network firewall rds just like ec2 instance (security groups)
- So to create a database in rds we need
- db subnet group: what are different subnets in which rds can be created
- db security group : what ips should be allowed to access database
- Now in AWS for every region we have default vpc (network created)

- Now lets create a security group which will open 3306 port from any where so that we can attach to mysql rds

- Now lets create a DB Subnet group which allows the following az
- us-west-2a
- us-west-2b
- us-west-2c
- Navigate to RDS

- In AWS we can configure High Availability using two architectures
- Single-AZ Deployment
- Multi-AZ Deployment
- Next Steps:
- Lets use the created DB Subnet and security group to create an rds mysql instance
- We need to understand instance sizes
- We will also be install some client softwares to connect to database
- We will explore public connectivity, tunneling connectivity and private connectivity to databases.
