Master AWS Storage & Databases: Complete Guide to S3, RDS, Aurora, and DynamoDB for Interviews
Amazon S3 (Simple Storage Service)
Amazon S3 is a foundation or the heart of AWS. It is an object storage service where we can store any type of data whether structured or unstructured at an infinite scale.
Lets assume we are working for a large scale commerce company. We receive images, csv files, pdf and logs from millions of users all of which we store an S3 bucket.
Get SULTAN ANSARI’s stories in your inbox
Join Medium for free to get updates from this writer.
There are two most important things in this
- Storage Classes: Not all data is equally important. For data that is used daily use S3 standard, for data needed once a month use infrequent Access(IA) and for data must be kept for years solely for audit purpose such as a compliance logs used amazon glacier(which is very inexpensive).
- Lifecycle Policies: This an automated rule that move data over time for example if a files has not been used for 30 days move it from standard to IA(Infrequent access) and after 365 days archive it in Glacier. This significantly reduce cloud cost.
Relational Databases (Amazon RDS & Aurora)
When it come to structured transactional data where acid properties and restrict schema are required we use Amazon RDS and Aurora.
- Consider a bank system where a user account number, balance and transactional history need to be stored in fixed table (rows and columns) in such a case, we can not used NOSQL, a relational database is required.
- Amazon RDS: This is a managed service that save us the headache of having to install and maintain MYSQL, PostgreSQL and SQL servers on our own servers.AWS handling everything patching, backup and replication.
- Amazon Aurora: This is an AWS own cloud native relation database (MySQL/PostgreSQL). It is upto 5 times faster than RDS and its storage scales automatically (up to 128TB, without requiring any manual intervention).
NoSQL Databases (Amazon DynamoDB)
When we required ultra low latency (millisecond response time) and high scalability for unstructured and semi structured data we use Amazon dynomoDB(NOSQL).
When you shop on Amazon.Each user card is unique and contain a dynamic number of items (ranging from 1 to 50) creating a rigid relational table for this is difficult.
DynamoDB is a serverless key-value document database. It does not have a fixed schema.Regardless of how sudden a surge in a traffic might be such as during a ‘Big Billion Days’ sale. It can read and write data within mili second nd we don’t even have to worry about server management.
Conclusion
if you need to store raw data or files, S3 is the best option; for transactional and relational data — such as in banking — you would use RDS/Aurora; and for fast-moving application data or session management where speed is the top priority, DynamoDB would be the go-to choice.








