Object Storage Wars between Digital Ocean vs AWS (DO Space vs S3)
Tags: digitalocean, aws, productivity, beginners
Published: 2020-03-11 08:52:33

Object Storage becomes more popular nowadays than before. Especially, when AWS announces about s3 protocol. Usually, we used it to offload our static assets. Because the best practice for serve one service/application, We need to serve our static assets from other places. 

Today, every Cloud provider tries to provide this type of storage as part of their services. Each Object storage from each cloud provider has its characteristics and unique setup.
 
At this opportunity, I want to share the difference between different Cloud Provider (AWS & DigitalOcean).

So, let's start!
# CLI
Digital Ocean supports multiple User Interfaces (GUI & CLI) as long as the User Interface can support s3 protocol. If you want to use CLI, One of the tools I recommend for you to use is `s3cmd`. Since it has an official guide on DigitalOcean [pages](https://www.digitalocean.com/docs/spaces/resources/s3cmd-usage/).

AWS itself has a native CLI which we called `awscli`. All the features quite complete, so it can support your scenario management.
Besides of that, AWS also supports other User Interfaces that support s3 protocol.

# Authorization & authentication
DigitalOcean has a simple authentication & authorization control. You just need to choose between two solutions like below:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ggi7lergprqza0e6tfs0.PNG)
If you choose restrict access, the only user who already has access key can access your object storage at DigitalOcean. 

For AWS, They have various options you can use. You can restrict access to your object storage from your user level using user authorization (IAM), access control to your object with ACL, or restrict with the storage permission (bucket policy) itself.

# Advanced Configuration
Right now, Until this article published, We can manage CORS Configuration on Digital Ocean. You can do the CORS setup depending on your needs.

AWS has more advanced options. Besides of the CORS configuration, AWS has various options like encryption, speed, versioning, integration, etc. You can refer to the images below
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/dwzwyl8j3p1kk0lbkbwi.PNG)

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/ivmcjsb3q538jl24zio6.PNG)
Or refer to this [docs](https://aws.amazon.com/s3/features/)

# CDN
DigitalOcean support CDN for the object storage, you need to enable the feature first for using it. Refer to this image below how to do it:
![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/robwu9t9it8ahc8vckra.PNG)

For AWS, if you want to use object storage with CDN, you can integrate with another AWS service called Cloudfront. All the configuration you need from CDN, you can set up directly at Cloudfront since Cloudfront have various options you can use.

# Conclusion
Each of the services has their strength. If you want Object storage which can use directly with some nice config, you can use DigitalOcean Space but if you want some control and specific needs, you can go to AWS S3 which has many advanced options to use. Choose wisely based on your needs.

I think that's it for now for this article comparison. Leave a comment below about your thoughts! Thanks.