Need advice about which tool to choose?Ask the StackShare community!

Amazon EC2

+ 1
Amazon S3

+ 1
Add tool

Amazon EC2 vs Amazon S3: What are the differences?

Amazon EC2 (Elastic Compute Cloud) and Amazon S3 (Simple Storage Service) are two core services offered by Amazon Web Services (AWS). Here are the key differences between Amazon EC2 and Amazon S3:

  1. Purpose and Functionality: Amazon EC2 is a virtual server infrastructure that offers resizable compute capacity in the cloud for running applications, hosting websites, and performing computing tasks. Amazon S3 is a secure and scalable cloud-based storage service for various data types, widely used for backups, websites, applications, and media files.

  2. Data Storage and Object Storage: Amazon S3 is an object storage service designed for storing and retrieving any amount of data from anywhere on the web. It is a scalable and highly durable storage solution. Amazon EC2, on the other hand, is a cloud service for resizable compute capacity, enabling users to launch and manage virtual machines in the AWS cloud for various computing tasks and hosting applications.

  3. Pricing Model: EC2 is priced based on the chosen instance type, the number of instances, and the usage hours. On the other hand, S3 is billed based on the amount of data stored, the number of requests made to retrieve or store data, and any data transfer costs.

  4. Use Cases: Amazon EC2 is commonly used for running web servers, application servers, databases, batch processing tasks, and other computing workloads that require flexible and scalable compute resources. Amazon S3, on the other hand, is ideal for storing and serving large volumes of static content, backups, media files, data archives, and content distribution. It is often used in conjunction with other AWS services to store and deliver data efficiently.

In summary, EC2 is designed for scalable virtual computing instances and running applications, while S3 is focused on durable and scalable object storage for unstructured data.

Advice on Amazon EC2 and Amazon S3
Vibhanshu Biswas
Sr. Software engineer at Neurosensum International India Private Limited · | 2 upvotes · 17.4K views

We have an Angular app for our B2B app and I'm unable to understand what to choose and why? currently, we use the Azure Web app. What can be the possible issues with each Stack?

I want to make sure that we have high availability with minimum infrastructure requirements such as load balancers and web servers. But with maximum performance metrics. 1) EC2 will give full control to me but I will have to manage everything on my own. 2) EBS is a more or less managed system but will we lack any less control? 3) S3 is it scalable and can it handle large requests that will need load balancers and what about performance metrics.

See more
Replies (2)
Julien DeFrance
Principal Software Engineer at Tophatter · | 5 upvotes · 17.4K views

Hi Vibhanshu, When it comes to serving a static website, single page application, S3 or a combination of S3/CloudFront, is a great fit. There is no server that you need to manage, and S3 is as resilient and scalable at it gets. Moreover, it's certainly the most cost-effective solution you'll be able to come up with. Is your application fully static or does it come with compute needs? - Regardless, I would highly discourage you from running anything directly on a custom EC2 instance of your own, as this will from the get-go but also over time, come with high maintenance costs. - Elastic Beanstalk, (not to be mistaken with EBS, which acronym stands for Elastic Block Storage), on the contrary, is a rather powerful way to manage your applications and environments. Either via the CLI or through the console, you can easily configure your environment variables, load balancers, certificates, events/thresholds causing your instances counts to scale up/down, steaming of logs... - Elastic Beanstalk supports by default a couple of language, but these don't always allow you to run the version/dependency you need. For best decoupling from the underlying instances, you might want to look at leveraging Docker (Elastic Beanstalk has Docker-compatible AMIs), so you are in control of the stack you application runs on.

See more
Amazon S3Amazon S3

As you have only mentioned an Angular app so I'm assuming that you're hosting your backend APIs separately. You can do a production build of the Angular app and put it in S3 (without public access). Next, you can create a CloudFront distribution for this bucket and point a record in your Route53 hosted domain to this distribution. This way your website will be highly available and fast as caching will be available. Note: With this method, you should make sure when you push new build in the bucket, you do not delete the service-worker script or else service worker will stop caching.

I will not recommend using EC2 as it seems overkill for this task. You will have to manage an AMI with Nginx or Apache or some other static web server on your own. You will also have to attach an elastic IP with the instance or an ALB for connecting it to a Cloudfront distribution. Too much work.

You can go with Elastic Beanstalk. It will reduce the setup work but still big resources for an Angular SPA.

As a bonus, you can have multiple Cloudfront distribution+S3 bucket for multiple environments (production, staging, etc.) and use weighted routing in Route 53 record for AB test or blue/green deployments.

See more
Decisions about Amazon EC2 and Amazon S3
Jerome/Zen Quah
Shared insights
Amazon EC2Amazon EC2DigitalOceanDigitalOcean

DigitalOcean was where I began; its USD5/month is extremely competitive and the overall experience as highly user-friendly.

However, their offerings were lacking and integrating with other resources I had on AWS was getting more costly (due to transfer costs on AWS). Eventually I moved the entire project off DO's Droplets and onto AWS's EC2.

One may initially find the cost (w/o free tier) and interface of AWS daunting however with good planning you can achieve highly cost-efficient systems with savings plans, spot instances, etcetera.

Do not dive into AWS head-first! Seriously, don't. Stand back and read pricing documentation thoroughly. You can, not to the fault of AWS, easily go way overbudget. Your first action upon getting your AWS account should be to set up billing alarms for estimated and current bill totals.

See more
Craig Finch
Principal Consultant at Rootwork InfoTech · | 6 upvotes · 187.9K views

We first selected Google Cloud Platform about five years ago, because HIPAA compliance was significantly cheaper and easier on Google compared to AWS. We have stayed with Google Cloud because it provides an excellent command line tool for managing resources, and every resource has a well-designed, well-documented API. SDKs for most of these APIs are available for many popular languages. I have never worked with a cloud platform that's so amenable to automation. Google is also ahead of its competitors in Kubernetes support.

See more
Stephen Fox
Artificial Intelligence Fellow · | 2 upvotes · 191K views

GCE is much more user friendly than EC2, though Amazon has come a very long way since the early days (pre-2010's). This can be seen in how easy it is to edit the storage attached to an instance in GCE: it's under the instance details and is edited inline. In AWS you have to click the instance > click the storage block device (new screen) > click the edit option (new modal) > resize the volume > confirm (new model) then wait a very long time. Google's is nearly instant.

  • In both cases, the instance much be shut down.

There also the preference between "user burden-of-security" and automatic security: AWS goes for the former, GCE the latter.

See more
Gabriel Pa

We offer our customer HIPAA compliant storage. After analyzing the market, we decided to go with Google Storage. The Nodejs API is ok, still not ES6 and can be very confusing to use. For each new customer, we created a different bucket so they can have individual data and not have to worry about data loss. After 1000+ customers we started seeing many problems with the creation of new buckets, with saving or retrieving a new file. Many false positive: the Promise returned ok, but in reality, it failed.

That's why we switched to S3 that just works.

See more

Most bioinformatics shops nowadays are hosting on AWS or Azure, since they have HIPAA tiers and offer enterprise SLA contracts. Meanwhile Heroku hasn't historically supported HIPAA. Rackspace and Google Cloud would be other hosting providers we would consider, but we just don't get requests for them. So, we mostly focus on AWS and Azure support.

See more
Ashish Singh
Tech Lead, Big Data Platform at Pinterest · | 38 upvotes · 3M views

To provide employees with the critical need of interactive querying, we’ve worked with Presto, an open-source distributed SQL query engine, over the years. Operating Presto at Pinterest’s scale has involved resolving quite a few challenges like, supporting deeply nested and huge thrift schemas, slow/ bad worker detection and remediation, auto-scaling cluster, graceful cluster shutdown and impersonation support for ldap authenticator.

Our infrastructure is built on top of Amazon EC2 and we leverage Amazon S3 for storing our data. This separates compute and storage layers, and allows multiple compute clusters to share the S3 data.

We have hundreds of petabytes of data and tens of thousands of Apache Hive tables. Our Presto clusters are comprised of a fleet of 450 r4.8xl EC2 instances. Presto clusters together have over 100 TBs of memory and 14K vcpu cores. Within Pinterest, we have close to more than 1,000 monthly active users (out of total 1,600+ Pinterest employees) using Presto, who run about 400K queries on these clusters per month.

Each query submitted to Presto cluster is logged to a Kafka topic via Singer. Singer is a logging agent built at Pinterest and we talked about it in a previous post. Each query is logged when it is submitted and when it finishes. When a Presto cluster crashes, we will have query submitted events without corresponding query finished events. These events enable us to capture the effect of cluster crashes over time.

Each Presto cluster at Pinterest has workers on a mix of dedicated AWS EC2 instances and Kubernetes pods. Kubernetes platform provides us with the capability to add and remove workers from a Presto cluster very quickly. The best-case latency on bringing up a new worker on Kubernetes is less than a minute. However, when the Kubernetes cluster itself is out of resources and needs to scale up, it can take up to ten minutes. Some other advantages of deploying on Kubernetes platform is that our Presto deployment becomes agnostic of cloud vendor, instance types, OS, etc.

#BigData #AWS #DataScience #DataEngineering

See more
Get Advice from developers at your company using StackShare Enterprise. Sign up for StackShare Enterprise.
Learn More
Pros of Amazon EC2
Pros of Amazon S3
  • 647
    Quick and reliable cloud servers
  • 515
  • 393
    Easy management
  • 277
    Low cost
  • 271
  • 89
    Market leader
  • 80
    Backed by amazon
  • 79
  • 67
    Free tier
  • 58
    Easy management, scalability
  • 13
  • 10
    Easy to Start
  • 9
  • 9
  • 9
    Widely used
  • 7
    Node.js API
  • 5
    Industry Standard
  • 4
    Lots of configuration options
  • 2
    GPU instances
  • 1
    Simpler to understand and learn
  • 1
    Extremely simple to use
  • 1
    Amazing for individuals
  • 1
    All the Open Source CLI tools you could want.
  • 590
  • 492
  • 456
  • 329
    Simple & easy
  • 83
    Many sdks
  • 30
  • 13
    Easy Setup
  • 11
  • 11
    1000+ POPs
  • 6
  • 4
    Plug and play
  • 4
  • 3
    Web UI for uploading files
  • 2
    Faster on response
  • 2
  • 2
    GDPR ready
  • 1
    Easy to use
  • 1
  • 1
    Easy integration with CloudFront

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon EC2
Cons of Amazon S3
  • 13
    Ui could use a lot of work
  • 6
    High learning curve when compared to PaaS
  • 3
    Extremely poor CPU performance
  • 7
    Permissions take some time to get right
  • 6
    Requires a credit card
  • 6
    Takes time/work to organize buckets & folders properly
  • 3
    Complex to set up

Sign up to add or upvote consMake informed product decisions