Money and time saving are very often significant factors for a decision on moving to the cloud. Unfortunately, it’s also easy to waste money when on cloud and spend them when no really needed. This short article will give you few tips how not waste your money and how to save time.
1. Data stored in an S3 bucket can be imported directly in to Aurora
Instead of importing data to an EC2 instance and then loading it to Aurora, you can save time and load data directly from your S3 bucket. The data to import can be located in any region accessible from your Aurora cluster. Data can be in text or XML format and cannot be compressed.
Use LOAD DATA FROM S3 or LOAD XML FROM S3 commands to load data. Remember to give your Aurora permissions to access S3 bucket before importing data. Aurora has to be allowed to connect to S3 as well. The database user issuing above commands must be granted the LOAD FROM S3 privilege to issue either of them.
2. Save data from an Aurora DB Cluster into Text Files in an Amazon S3 Bucket
Similarly, you can save time and instead of downloading the data to the client first and then copying it to Amazon S3, you can upload data from Aurora Cluster directly to your S3 bucket. Issue the SELECT INTO OUTFILE S3 command to query data from an Aurora DB and save it into text files stored in S3.
Same as for loading data from S3, you need to allow Aurora to access to S3 and grant SELECT INTO OUTFILE S3 privilege to the DB user.
3. Clone your Aurora DB
Whenever you need experiment and assess the impact of changes, perform workload-intensive operations, run test, reorganize your DB or do anything that may affect data in your DB, you can do it using database clone.
Using database cloning you can quickly and cost effecting create clones of all your databases. They require just a minimal additional space when first created. Data is in fact copied at the time it changes either on the source databases or clone databases. It is called copy-on-write.
You can make multiple clones of your source instance as well as you can make a clone of another clone. Clones are not affected when source database is deleted.
4. You can create an Amazon Aurora Read Replica from an RDS MySQL DB Instance without taking the DB offline
To save time and ease migration from RDS MySQL instance to the Amazon Aurora database you can use Aurora Read Replica. To do so, you need to create Aurora Replica from you MySQL instance and them promote Replica to a standalone Aurora Cluster. Note that this feature works for MySQL instances up to 6 TB big.
5. Use db.t2.small or db.t2.medium DB instance classes
To save money, for the test and dev environment you should use db.t2.medium or the newest db.t2.small instances. Of course you can use small instances for light production workloads if you wish. T2 instances are burstable ones so they provide a baseline performance and are capable to a higher performance when required. They are intended for workloads that do not support a high workload for an extended amount of time.
If you use a T2 instances in your cluster, it is recommended that all instances within a DB cluster use the same instance class.
6. Use read replicas to reduce the load on your source DB Instance
Replicas provide enhanced performance and durability for DB instances. You can create multiple replicas from of a given source DB and serve data from a multiple copies to increase aggregated read throughput. As Aurora replicas share the same underlying storage as the source instance, you can lower overall cost and avoid the need to copy data to the replica nodes.
7. When Aurora instance is deleted, manual database snapshots are not deleted
As all backups are stored on S3 you have to pay for storing them. When you delete an Aurora DB instance all automated backups are deleted, but manual DB snapshots remains on S3. If you do not need them you should delete them manually to save money on storage.
8. Use Trusted Advisor Amazon RDS Idle DB Instances check to find any instances that appear to be idle
Trusted Advisor can analyze your environment and help you to save money. Amazon RDS Idle DB Instances check analyzes your Amazon RDS configuration for idle DB instances. If a DB instance has not had connection for a prolonged period of time, you can delete it to reduce costs.
Note, that you need to upgrade your support plan to use this feature.
9. You cannot stop Aurora DB. Create snapshots
It is currently not possible to stop Aurora DB instance so you cannot save money stopping them for the time they are not in use. However, if you want to save money during weekends for instance, when your dev databases are not in use, you can create snapshots, delete database and easily restore when needed.
10. Leverage Enhanced Monitoring to identify operating system issues
Amazon RDS provides a real-time metrics for the operating system you DB runs on. Enhanced monitoring gathers metrics from an agent on the instance so it may be useful when you want to monitor how different processes or threads on a DB instance use CPU.
Using Enhanced Monitoring may help you to see how the DB instance goes up over time so you can predict for instance when you need to scale up your Aurora DB or add another replica to able to serve high load. It saves time and money when you can prepare for such cases in advance.
DO YOU WANT MORE?
Register to a FREE webinar to learn more about Amazon Aurora and how you can save time and money on your database system as our great customer -> Zoetis.