Amazon RDS Costs
SAA-C02- Exam Prep
This section of the Solution Architect Associate learning path introduces you to the AWS database services relevant to the SAA-C02 exam. We then understand the service options available and learn how to select and apply AWS database services to meet specific design scenarios relevant to the Solution Architect Associate exam.
Want more? Try a lab playground or do a Lab Challenge!
- Understand the various database services that can be used when building cloud solutions on AWS
- Learn how to build databases using Amazon RDS, DynamoDB, and Redshift
- Learn how to create Elasticache and Neptune clusters
- Understand AWS database costs
- [Instructor] You're deep into the learning path now, and we've covered off compute, storage, networking, and now databases. So congratulations on getting this far. So again, let's take a recap of some of the most important elements that you need to be aware of for the exam and a look at some more example questions covering AWS databases. For me personally, when I was studying for the AWS Solutions Architect Associate exam, I found databases the hardest aspect to grasp and I'm sure I'm not alone from that perspective but you've got through the theory which is the hardest part. Okay, let's focus on the essential must-know points for the certification, and this mainly covers RDS, DynamoDB, and ElastiCache. So RDS, let's hit the key points. So what is RDS? It's a managed relational database service, which means all of the patching required of the underlying instance and software that runs RDS is going to be managed by AWS.
In addition to automated backups of your database. So that again will be managed by AWS as well. So this takes a lot of the administrative burden out allowing you to just work on the data within your databases. So even though automatic backups are taken care of you can still perform your own manual snapshot backups. Now, because it's managed, it's quick and easy to set up. It has a range of different database engines available to suit your needs, and if you couple this with a scalable and resizable capacity delivery of high performance then this is a great choice for mobile and web applications in addition to e-commerce applications as well. Now, remember, if you need to build in high availability to your audience database you'll need to use the Multi-AZ feature of RDS to offer additional resiliency in case your primary instance fails. Now, we will talk more about high availability in a later course in this learning path, but Multi-AZ and read replicas will very likely come up in the exam.
So the previous course gave a good introduction to these features, but we will dive into them more in more detail in a later course. I want to point out Aurora which is one of the database engines of RDS and its compatibility with MySQL and PostgreSQL. It's highly likely that Aurora will be mentioned in the exam and it's usually in relation to performance and cost related questions. Now this is because it can run fives times faster than MySQL and three times faster than PostgreSQL while still maintaining tight security, reliability, and availability, and its also extremely cost-effective operating at just one 10th of the cost of other databases. Now it's also capable of running 15 read replicas and it can operate across three different availability zones while continuously backing up allowing to recover to any point in time, so it's super powerful. So let's see how RDS compares to DynamoDB. So the first big difference to RDS is that it's not a relational database service. It's a NoSQL key value database. It's super fast designed for ultra high performance and capable of handling up to 20 million requests per second. It's massively scalable, multi-regional, and can scale with single digit latency regardless of how big the database gets. Whereas with RDS, the larger the database the slower it can get, but with DynamoDB it maintains the ultra low latency so make sure you bear that in mind. Much like RDS though, it's fully managed. So again, you just need to focus on your data as all patch management and backups are taken care of by AWS but instead of having to select an instance like RDS, there is no need to with DynamoDB as it's serverless. Now, you will find that due to these features it's used for applications related to gaming, media and entertainment, finance and banking, and any solutions that require that single digit millisecond latency.
So let's look at a couple of exam questions that relate to both RDS and DynamoDB. So the first question, when you force a failover of your Amazon RDS database instance, which of the following actions will RDS take? Choose two answers. So this is talking about Multi-AZ and what happens in that process. So if you force a failover of your primary RDS database instance, what happens? So A, it allocates new Elastic IP which points to the new replica. No, because it doesn't actually add any new Elastic IP addresses, it's all done at DNS level. So that is incorrect. B, it automatically switches to a standby replica in another region. It doesn't go to another region because the feature is called Multi-AZ, multi-availability zone. So it places the secondary, the standby, in a second availability so not in a different region. So B is out. So that kind of only leaves C and D, so let's take a look. It updates the DNS record for the database instance to point to the standby database instance. That is correct, we know it uses a standby database instance and it simply updates the DNS record pointing to that new instance. And D, automatically switches to a standby replica in another availability zone if you have enabled AZ. And that is correct, if you configured Multi-AZ then it will switch across to the other instance. Okay, so let's look at another question. An online gaming site asked if you can deploy a database that is fast, highly scalable NoSQL key-value database service in AWS for a new site that he wants to build. So which database would you recommend here? So straight away, we're thinking of NoSQL. So straight away to me, I think of DynamoDB. So let's take a look.
So we have Amazon ElastiCache. Now ElastiCache is only used to help with caching of data mainly. So although it is fast and scalable, it's not a key-value database service. Amazon Aurora, that is a relational database service. It's not a NoSQL key-value database, so that's out as well. Amazon RDS, again that's another relational database service. So we only have Amazon DynamoDB, and that is correct. That is a NoSQL key-value database that's highly scalable and fast, so the answer here is D. Okay, so let's now take a look at Amazon ElastiCache. So ElastiCache makes it easy to deploy, operate, and scale open-source, in-memory data stores in the cloud. So it basically improves performance of your applications through caching. Now, one key point to note for the exam is that it supports two different engines, Memcached and Redis. So I recommend you have a solid understanding of when to use each engine. Now, genuinely if you are looking for an in-memory key store and or cache that offers high-performance sub-millisecond latency, then Memcached is your best choice. And it's also recognized for its speed, performance, and also its simplicity as well. Whereas Redis offers a more robust set of features of that of Memcached while still offering that ultra high performance. So a common scenario might come across could be that you have a web application that reads and writes data to a persistent storage, for example, RDS, but however persistent storage tends to experience some fluctuations in latency as each piece of data needs to be written to or retrieved and this is affecting the overall performance.
So what could you do to enhance the performance of read requests? Well, the answer would be to implement an in-memory cache like ElastiCache, and this is especially true in industries such as online gaming and social networking sites. So let's see how ElastiCache could appear in a question in the exam. An online organization is using AWS to host the infrastructure for its WordPress site. For this deployment, WordPress uses Amazon Aurora for MySQL database cluster for its database as traffic to the website is increased and the database is scaled, cost for the database has also risen. The organization wants to implement a more cost efficient architecture for WordPress's read-intensive workload without sacrificing performance. So which of the following solutions can help reduce database costs without affecting the performance? Okay, so let's have a look at some of the different options where we think it could reduce cost without affecting their performance. So A, migrate to Amazon RDS for MySQL. Would that reduce the costs? I don't think it would. As we know, Amazon Aurora is one of the cheapest database engines and it's got great performance, so I'll rule A out. B, change a database engine to PostgreSQL. Again, Aurora is known for being cheaper than PostgreSQl and also enhanced performance. So C, use Aurora Global Database for the deployment. Well, the Aurora Global Database is designed for globally distributed applications. So it's not really useful in this scenario because it's not talking about that element. And then finally enable in-memory object caching using Amazon ElastiCache. Now, if we enable object caching, we can reduce latency and improve the throughput for read-intensive applications like WordPress. So by implementing caching then reading frequently access data from the cache, reduces the number of queries to the database and therefore reduces the costs. So out of all of these, this is the only one that really supports the reduction of costs and maintains that peak performance as well, so the answer here is D. Let's look at one final question. So a team of developers building a new social networking application has asked you to recommend a solution to store user-session information. Now the team is looking for a simple object-caching solution capable of scaling in and out to meet demand. The application runs on multiple EC2 instances and the user-session information must be accessible to each service, which Amazon servers should you recommend to provide a simple low-latency cache for user-session information. So there's a couple of key words here. We're looking at simplicity, we're looking at caching, and also low latency as well. So if we're looking at caching then we're typically going to be focusing on ElastiCache. So let's take a look at our answers. Amazon S3, that's nothing to do with dates, prices, or caching so we can rule that straight out. B, DocumentDB, again, that's not a database that's used for caching. We really looking for something to do with ElastiCache. So here we have C and D, we have ElastiCache for Memcached and also ElastiCache for Redis. Now, because they talk about simplicity and that low latency I would focus on the Memcached, because like I said previously, it's recognized for its speed, performance, and also the simplicity of the service as well. So the answer here is C. So that's some of the top points I suggest you must note when looking at databases for the exam. So to recap at a high level, RDS is a managed relational database service that supports multiple database engines specifically Amazon Aurora, which is highly performance and cost-effective, and it's a PostgreSQL and MySQL compatible engine. Whereas DynamoDB is a managed serverless, NoSQL database service designed for ultra high performance, providing single digit latency. And ElastiCache is used as an in-memory data store to improve the read performance of your applications through caching and is supported by Redis and Memcached. Okay, so that's the short summary wrapped up. So if you're ready, let's take the next step to become an AWS certified.
Stuart has been working within the IT industry for two decades covering a huge range of topic areas and technologies, from data center and network infrastructure design, to cloud architecture and implementation.
To date, Stuart has created 150+ courses relating to Cloud reaching over 180,000 students, mostly within the AWS category and with a heavy focus on security and compliance.
Stuart is a member of the AWS Community Builders Program for his contributions towards AWS.
He is AWS certified and accredited in addition to being a published author covering topics across the AWS landscape.
In January 2016 Stuart was awarded ‘Expert of the Year Award 2015’ from Experts Exchange for his knowledge share within cloud services to the community.
Stuart enjoys writing about cloud technologies and you will find many of his articles within our blog pages.