Chapter 16: Amazon RDS
Let's go. In Chapter 10 we installed MySQL or MariaDB on the same EC2 instance. That is the right way to learn SQL. In a real project the database should not live and die with that one server. Today we learn Amazon RDS: AWS patches the engine, takes backups, and can fail over to another Availability Zone. You still write the SQL. Don't worry, you will get it.
चला मित्रांनो, Chapter 10 मध्ये आपण MySQL किंवा MariaDB त्याच EC2 वर install केला. SQL शिकायला तो रस्ता बरोबर आहे. पण खऱ्या project मध्ये database त्या एकाच server सोबत जगू नये. आज Amazon RDS शिकूया: AWS engine patch करतो, backup घेतो, आणि दुसऱ्या Availability Zone ला failover करू शकतो. SQL तुम्हीच लिहिता. घबरू नका, कळेल तुम्हाला.
चलो दोस्तों, Chapter 10 में हमने MySQL या MariaDB उसी EC2 पर install किया. SQL सीखने का यही रास्ता सही है. असली project में database उस एक server के साथ नहीं जीना चाहिए. आज Amazon RDS सीखते हैं: AWS engine patch करता है, backup लेता है, और दूसरे Availability Zone पर failover कर सकता है. SQL आप ही लिखते हैं. घबराओ मत, समझ आ जाएगा.
What you will learn in this chapter
- Why RDS instead of MySQL on EC2
- Engines and the DB subnet group
- Create a private MySQL database
- Connect from EC2 with the client
- Point PHP, Python, Node, WordPress
- Backups, snapshots and Multi-AZ
- Stop, delete and a full lab
This chapter uses the EC2 instance from Chapter 5, the MySQL application from Chapter 10, and the VPC and security groups from Chapter 15. Keep the console in Asia Pacific (Mumbai) ap-south-1 and do every step yourself.
Browser --> EC2 (Nginx / PHP / Flask / Node) --3306--> RDS MySQL
private IP 10.0.1.25 endpoint (DNS name)
security group: web-sg security group: rds-sg
allows 3306 ONLY from web-sg
The database is not a folder on the EC2 disk.
It runs in a DB subnet group: subnets in at least two AZs.
Concepts in this chapter
- 16.1Why RDS instead of MySQL on EC2
- 16.2Engines and where the database lives
- 16.3Create a MySQL database
- 16.4Connect from EC2
- 16.5Point your app at the endpoint
- 16.6Backups and snapshots
- 16.7Multi-AZ and read replicas
- 16.8Stop and delete
- 16.9Production cautions