Comparison Between Amazon S3, DynamoDB and RDS

S3 Storage

S3 is object storage for extensive binary unstructured data with slower response times. It can store objects up to 5 TB. The objects are stored in buckets. Buckets are region-specific. You can also set up cross-region replication for faster access or backups.

Feature:

  • S3 (Simple Storage Service)
    • Is an Object Storage. You put an entire object into s3, and you can pull it back out. It is not useful for editing the object themselves.
    • It’s Great for static assets.
    • S3 is for storing objects by key – which can pretend to be kept by filename.
    • In S3, objects are accessible directly by the browser using HTTP. 
    • S3 supports versioning by which we can easily track the history of changes or updates on an object to a previous state.

Storage:

  • S3 is object storage.  You can store your files is an S3 bucket. 

Performance:

  • As per the Amazon S3 request rate and performance guidelines, applications can now achieve “at least 5,500 GET, and 3,500 PUT/POST/DELETE requests per second”, up from the former “300 PUT/LIST/DELETE requests per second or more than 800 GET requests per second”.

Backup:

Security:

  • Make sure that your Amazon S3 buckets use the correct policies and are not publicly accessible
  • Implement the least privilege access
  • Use IAM roles for applications and AWS services that require Amazon S3 access
  • Enable multi-factor authentication (MFA)
  • Consider encryption of data at rest
  • Consider S3 Object Lock
  • Enable versioning
  • Consider Amazon S3 cross-region replication
  • Consider VPC endpoints for Amazon S3 access

Pricing:

  • Storage cost: Amazon S3 charged per GB / month. $0.03 per GB / month, charged hourly.
  • API cost for file operation: $0.005 / 10000 read requests, and write requests are ten times more expensive.
  • Data transfer charge outside of AWS region: $0.02 / GB to different AWS region, and $0.06 / GB for the internet.

Based on region and volume, the actual prices may differ a bit, but the optimization techniques remain the same. 

Usecases:

  • Amazon S3 is a cheap and amazing tool to work with for your mobile or web application storage requirements. S3 is a solution for large and small businesses for file storing, file sharing. With on-demand pricing and scalability of S3, many companies like Dropbox, Netflix, and Reddit are the avid users of S3. S3 is the popular file storage system Dropbox built its entire storage capacity on top of Amazon S3.

DynamoDB

DynamoDB is a NoSQL database and designed for storing structured database (in the form of JSON). DynamoDB is a document database and stores item in tables which can be in a particular region or globally replicated. DynamoDB global tables support multi-master replication so that the client can write into the same table or the same item from multiple regions simultaneously. DynamoDB supports individual items up to 400 KB. If the item is relatively small, especially if the items are less than 4 KB, the DynamoDB is faster than S3 for individual operations. The number Of tables per unit 256.

Feature:

  • Delivers single-digit millisecond performance at any scale.

Storage:

  • Supports tables Of virtually any Size.

Performance:

  • Single-digit millisecond read and write performance. DynamoDB handles more than 10 trillion requests per day with peaks greater than 20 million requests per second, over petabytes of storage. DynamoDB Accelerator is an in-memory cache that can improve the read performance Of your DynamoDB tables by up to 10 times—taking the time required for reads from milliseconds to microseconds, even at millions Of requests per second. You specify the read and write throughput for each Of your tables.

Backup:

  • Point-in-time recovery provides continuous backups of your DynamoDB table data, and you can restore that table to any point in time upto the second during the preceding 35 days. On-demand backup and restore allows you to create full backups of your DynamoDB tables’ data for data archiving.

Security:

  • Isolate your database in your virtual network. Connect to your on premises IT infrastructure using industry-standard encrypted VPNs. You can configure control network access firewall settings and to your database instances. Integrates with IAM.

Maintenance:

  • No maintenance since DynamoDB is serverless.

Pricing:

  • Charges for storing, reading, and writing data in your DynamoDB tables, along with any optional features you choose to enable. There are specific billing options for each of DynamoDB’s capacity modes.

Usecases:

  • Internet-scale applications, shopping carts, real-time bidding, and customer preferences, personalization, content management, and mobile applications.

Amazon RDS

Amazon RDS is a relational and managed Database Service provided by AWS. RDS supports different relational database product and is used for general-purpose transactional databases.

  • RDS supports different database engines like MySQL, Oracle, Postgres, MariaDB, or Microsoft SQL relational database.
  • Relation database eliminates much of the administrative overhead associated with managing, launching, and scaling your RDS on Amazon EC2 or in another computing environment.
  • A Relational database RDS instance can be as small as having 2 GB RAM and one vCPU or as large as having 488 GB RAM and 64 vCPUs.

Feature:

  • Has several database instance types for different kinds of workloads and supports six database engines – Amazon Aurora, PostgreSQL, MySQL, MariaDB, Oracle Database, and SOL Server.

Storage:

  • 64 TB for Aurora engine. 16 TB for MySQL, MariaDB, SQL Server, Oracle, and PostgreSQL engines.

Performance:

  • General Purpose Storage is an SSD storage that delivers a consistent baseline Of 3 IOPS per provisioned GB with the ability to burst up to 3,000 lops. Provisioned IOPS Storage is an SSD-backed storage option designed to deliver a consistent IOPS rate that you specify when creating a database instance, up to 40,000 IOPS per database instance. Amazon RDS provisions that IOPS rate for the lifetime Of the database instance. Optimized for OLTP database workloads.

Backup:

  • The automated backup feature enables point in time recovery for your database instance. Database snapshots are user-initiated backups of your instance stored in Amazon S3 that are kept until you explicitly delete them.

Security:

  • Integrates with IAM.

Maintenance:

  • Amazon RDS will update databases with the latest patches. You can exert optional control over when and if your database instance is patched.

Pricing:

  • RDS’s pricing is generally cheaper than the others. RDS is available under a pay-as-you-go model, with a higher tariff, or a reserved instance model at a lower tariff and a commitment to a certain amount of usage.
    The monthly charge for each database instance that you launch. Option to reserve a DB instance for a one or three-year term and receive discounts in pricing, compared to On-Demand instance pricing.

Usecases:

  • Traditional applications, E and e-commerce.

Conclusion

If you have standard scaling requirements, RDS is the better option. Similarly, if you have a very high read/write requests, AWS DynamoDB might work better.

Difference between Amazon S3 and DynamoDB is that S3 is the object/file storage, whereas the DynamoDB is a Database. S3 and DynamoDB both are excellent storage services provided by AWS. There are many difference in terms of use cases, size limit, pricing, etc. Choosing the right storage service and database can save you a lot of money and time.S3 provides unlimited storage at relatively cheap cost than DDB, but read operations are much slower than DDB. However, you can perform http queries for the same.