S3, EBS, & EFS explained with Use Cases
we will understand the S3, EBS, & EFS with some real-world use cases

Student | Arth 3.0 learner
S3(simple storage service)
S3 is object storage that can be used for multiple AWS services as their storage.
You can use S3 as an event source for Lambda functions to trigger them when objects are created, modified, or deleted in S3 buckets. AWS Lambda is a serverless computing service that lets you run code without provisioning or managing servers.
Assume, we have an application that converts audio into text. Here we are using the S3 as a storage for Amazon Transcribe service. Now, we have already set the event which will trigger the lambda function by specifying prefixes (folder) and suffixes (.mp3). whenever the “.mp3” file is created under a particular folder, the event will trigger the lambda function, and the lambda function gets invoked. Here, we can see two use cases of S3:- 1) As an event source and 2) As a storage service.
- We can use S3 as an event source with services like:-
AWS LAMBDA
Amazon SNS
Amazon EventBridge
2. We can use S3 as a storage service with:-
Amazon Transcribe
Amazon CloudFront
Amazon Glacier
One more functionality of AWS S3 is that we can host a static website by configuring the S3 bucket to host a static website that includes images, videos, and HTML files. we need to upload the code of the static website on the S3 bucket and boom. S3 will automatically handle the storage and delivery of the website’s static content. Here, we don’t need servers to host a static website. In my opinion, hosting a static website using Amazon S3 is a serverless approach.

EBS(Elastic Block Storage)
EBS service can be mounted on only one instance.
Consider EBS, just like the volume of our laptop. But the laptop volume is physically attached to the system. However, EBS volume is a network-attached storage service that you can attach to your EC2 instances in AWS. Also, you can preserve your data even if you stop or terminate your EC2 instance. You can also create snapshots of your EBS volume and restore them to another EC2 instance if needed.
Now you will ask, can’t we host a static website with EBS? you’re correct. But here you will need a webserver to serve your web content on the internet like Apache, Nginx(Engine-X), etc.
To compare S3 and EBS in terms of website hosting,
S3 is suitable for hosting static websites that do not require server-side processing or interaction with databases. S3 is cheaper, scalable, and reliable than EBS for this purpose.
EBS is suitable for hosting dynamic websites that require server-side processing or interaction with databases. EBS is faster, more flexible, and more secure than S3 for this purpose.
EFS(Elastic file system)
EFS service can be mounted on multiple instances as their storage.
I have a scenario where the NFS server of Kubernetes is using the EFS service of AWS. We have mounted one EFS service on multiple nodes of Kubernetes. Under the nodes, there are some applications that are running on the Docker container or Kubernetes. Is there any use case for this? Yes, this is called centralized storage, where data of multiple nodes is stored on one EFS system in the same directory. Let’s take the example of Pinterest. We are uploading an image on Pinterest. Behind the scene, we are connecting to Pinterest via the first node. The image is uploaded successfully and we are able to see it. But now that node gets failed. now is that image still there on the website? yes, because we have used centralized storage. After a while, we go on Pinterest again, to see that image, but now the scenario is different. Behind the scene, we are making a connection via a different node because of the round-robin algorithm of Load Balancer, or the previous pod gets failed. This is the use case of centralized storage.
Thank you for reading!
If you have any questions or feedback, please leave a comment below or contact me at my Twitter or LinkedIn handles.




