Amazon EC2 Container Service vs AWS CloudFormation

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

Amazon EC2 Container Service

9.9K
6.7K
+ 1
322
AWS CloudFormation

1.4K
1.1K
+ 1
87
Add tool

Amazon EC2 Container Service vs AWS CloudFormation: What are the differences?

Developers describe Amazon EC2 Container Service as "Container management service that supports Docker containers". Amazon EC2 Container Service lets you launch and stop container-enabled applications with simple API calls, allows you to query the state of your cluster from a centralized service, and gives you access to many familiar Amazon EC2 features like security groups, EBS volumes and IAM roles. On the other hand, AWS CloudFormation is detailed as "Create and manage a collection of related AWS resources". You can use AWS CloudFormation’s sample templates or create your own templates to describe the AWS resources, and any associated dependencies or runtime parameters, required to run your application. You don’t need to figure out the order in which AWS services need to be provisioned or the subtleties of how to make those dependencies work.

Amazon EC2 Container Service can be classified as a tool in the "Containers as a Service" category, while AWS CloudFormation is grouped under "Infrastructure Build Tools".

Some of the features offered by Amazon EC2 Container Service are:

  • Docker Compatibility
  • Managed Clusters
  • Programmatic Control

On the other hand, AWS CloudFormation provides the following key features:

  • AWS CloudFormation comes with the following ready-to-run sample templates: WordPress (blog),Tracks (project tracking), Gollum (wiki used by GitHub), Drupal (content management), Joomla (content management), Insoshi (social apps), Redmine (project mgmt)
  • No Need to Reinvent the Wheel – A template can be used repeatedly to create identical copies of the same stack (or to use as a foundation to start a new stack)
  • Transparent and Open – Templates are simple JSON formatted text files that can be placed under your normal source control mechanisms, stored in private or public locations such as Amazon S3 and exchanged via email.

"Backed by amazon" is the top reason why over 97 developers like Amazon EC2 Container Service, while over 36 developers mention "Automates infrastructure deployments" as the leading cause for choosing AWS CloudFormation.

Instacart, Coursera, and Intuit are some of the popular companies that use Amazon EC2 Container Service, whereas AWS CloudFormation is used by Expedia.com, Redox Engine, and TimeHop. Amazon EC2 Container Service has a broader approval, being mentioned in 794 company stacks & 391 developers stacks; compared to AWS CloudFormation, which is listed in 197 company stacks and 77 developer stacks.

Decisions about Amazon EC2 Container Service and AWS CloudFormation
Kirill Shirinkin
Cloud and DevOps Consultant at mkdev · | 3 upvotes · 70K views

Ok, so first - AWS Copilot is CloudFormation under the hood, but the way it works results in you not thinking about CFN anymore. AWS found the right balance with Copilot - it's insanely simple to setup production-ready multi-account environment with many services inside, with CI/CD out of the box etc etc. It's pretty new, but even now it was enough to launch Transcripto, which uses may be a dozen of different AWS services, all bound together by Copilot.

See more
Andres Paredes
Lead Senior Software Engineer at InTouch Technology · | 3 upvotes · 49.2K views

If you want to integrate your cluster and control end to end your pipeline with AWS tools like ECR and Code Pipeline your best option is ECS using a EC2 instance. There are pros and cons but it's easier to integrate using cloud formation templates and visual UI for approvals, etc. ECS is free, you need to pay only for the EC2 instance but unfortunately, it is not standard then you cannot use standard tools to see and manage your Kubernetes. EKS in the other hand uses standard Kubernates definitions but you need to pay for the service and also for the EC2 instance(s) you have in your cluster.

See more

Because Pulumi uses real programming languages, you can actually write abstractions for your infrastructure code, which is incredibly empowering. You still 'describe' your desired state, but by having a programming language at your fingers, you can factor out patterns, and package it up for easier consumption.

See more
Sergey Ivanov
Overview

We use Terraform to manage AWS cloud environment for the project. It is pretty complex, largely static, security-focused, and constantly evolving.

Terraform provides descriptive (declarative) way of defining the target configuration, where it can work out the dependencies between configuration elements and apply differences without re-provisioning the entire cloud stack.

Advantages

Terraform is vendor-neutral in a way that it is using a common configuration language (HCL) with plugins (providers) for multiple cloud and service providers.

Terraform keeps track of the previous state of the deployment and applies incremental changes, resulting in faster deployment times.

Terraform allows us to share reusable modules between projects. We have built an impressive library of modules internally, which makes it very easy to assemble a new project from pre-fabricated building blocks.

Disadvantages

Software is imperfect, and Terraform is no exception. Occasionally we hit annoying bugs that we have to work around. The interaction with any underlying APIs is encapsulated inside 3rd party Terraform providers, and any bug fixes or new features require a provider release. Some providers have very poor coverage of the underlying APIs.

Terraform is not great for managing highly dynamic parts of cloud environments. That part is better delegated to other tools or scripts.

Terraform state may go out of sync with the target environment or with the source configuration, which often results in painful reconciliation.

See more

I personally am not a huge fan of vendor lock in for multiple reasons:

  • I've seen cost saving moves to the cloud end up costing a fortune and trapping companies due to over utilization of cloud specific features.
  • I've seen S3 failures nearly take down half the internet.
  • I've seen companies get stuck in the cloud because they aren't built cloud agnostic.

I choose to use terraform for my cloud provisioning for these reasons:

  • It's cloud agnostic so I can use it no matter where I am.
  • It isn't difficult to use and uses a relatively easy to read language.
  • It tests infrastructure before running it, and enables me to see and keep changes up to date.
  • It runs from the same CLI I do most of my CM work from.
See more
Get Advice from developers at your company using Private StackShare. Sign up for Private StackShare.
Learn More
Pros of Amazon EC2 Container Service
Pros of AWS CloudFormation
  • 99
    Backed by amazon
  • 71
    Familiar to ec2
  • 53
    Cluster based
  • 42
    Simple API
  • 26
    Iam roles
  • 7
    Cluster management
  • 7
    Programmatic Control
  • 7
    Scheduler
  • 4
    Socker support
  • 4
    Container-enabled applications
  • 1
    No additional cost
  • 1
    Easy to use and cheap
  • 42
    Automates infrastructure deployments
  • 21
    Declarative infrastructure and deployment
  • 13
    No more clicking around
  • 3
    Any Operative System you want
  • 3
    Infrastructure as code
  • 3
    Atomic
  • 1
    Automates Infrastructure Deployment
  • 1
    CDK makes it truly infrastructure-as-code

Sign up to add or upvote prosMake informed product decisions

Cons of Amazon EC2 Container Service
Cons of AWS CloudFormation
    Be the first to leave a con
    • 4
      Brittle
    • 2
      No RBAC and policies in templates

    Sign up to add or upvote consMake informed product decisions

    No Stats

    What is Amazon EC2 Container Service?

    Amazon EC2 Container Service lets you launch and stop container-enabled applications with simple API calls, allows you to query the state of your cluster from a centralized service, and gives you access to many familiar Amazon EC2 features like security groups, EBS volumes and IAM roles.

    What is AWS CloudFormation?

    You can use AWS CloudFormation’s sample templates or create your own templates to describe the AWS resources, and any associated dependencies or runtime parameters, required to run your application. You don’t need to figure out the order in which AWS services need to be provisioned or the subtleties of how to make those dependencies work.

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

    Jobs that mention Amazon EC2 Container Service and AWS CloudFormation as a desired skillset
    What companies use Amazon EC2 Container Service?
    What companies use AWS CloudFormation?
    See which teams inside your own company are using Amazon EC2 Container Service or AWS CloudFormation.
    Sign up for Private StackShareLearn More

    Sign up to get full access to all the companiesMake informed product decisions

    What tools integrate with Amazon EC2 Container Service?
    What tools integrate with AWS CloudFormation?

    Sign up to get full access to all the tool integrationsMake informed product decisions

    Blog Posts

    JavaScriptGitHubNode.js+29
    15
    11534
    GitHubPythonReact+42
    47
    39420
    GitHubPythonNode.js+47
    50
    69473
    GitHubPythonGit+22
    17
    13472
    GitHubDockerAmazon EC2+23
    12
    6360
    What are some alternatives to Amazon EC2 Container Service and AWS CloudFormation?
    Kubernetes
    Kubernetes is an open source orchestration system for Docker containers. It handles scheduling onto nodes in a compute cluster and actively manages workloads to ensure that their state matches the users declared intentions.
    Google Kubernetes Engine
    Container Engine takes care of provisioning and maintaining the underlying virtual machine cluster, scaling your application, and operational logistics like logging, monitoring, and health management.
    Amazon EKS
    Amazon Elastic Container Service for Kubernetes (Amazon EKS) is a managed service that makes it easy for you to run Kubernetes on AWS without needing to install and operate your own Kubernetes clusters.
    AWS Fargate
    AWS Fargate is a technology for Amazon ECS and EKS* that allows you to run containers without having to manage servers or clusters. With AWS Fargate, you no longer have to provision, configure, and scale clusters of virtual machines to run containers.
    Azure Kubernetes Service
    Deploy and manage containerized applications more easily with a fully managed Kubernetes service. It offers serverless Kubernetes, an integrated continuous integration and continuous delivery (CI/CD) experience, and enterprise-grade security and governance. Unite your development and operations teams on a single platform to rapidly build, deliver, and scale applications with confidence.
    See all alternatives