Need advice about which tool to choose?Ask the StackShare community!
AWS CloudFormation vs Webpack: What are the differences?
AWS CloudFormation: 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; Webpack: A bundler for javascript and friends. A bundler for javascript and friends. Packs many modules into a few bundled assets. Code Splitting allows to load parts for the application on demand. Through "loaders" modules can be CommonJs, AMD, ES6 modules, CSS, Images, JSON, Coffeescript, LESS, ... and your custom stuff.
AWS CloudFormation and Webpack are primarily classified as "Infrastructure Build" and "JS Build Tools / JS Task Runners" tools respectively.
"Automates infrastructure deployments" is the top reason why over 36 developers like AWS CloudFormation, while over 307 developers mention "Most powerful bundler" as the leading cause for choosing Webpack.
Webpack is an open source tool with 49.8K GitHub stars and 6.27K GitHub forks. Here's a link to Webpack's open source repository on GitHub.
According to the StackShare community, Webpack has a broader approval, being mentioned in 2209 company stacks & 1344 developers stacks; compared to AWS CloudFormation, which is listed in 197 company stacks and 77 developer stacks.
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.
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.
AdvantagesTerraform 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.
DisadvantagesSoftware 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.
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.
I could define the next points why we have to migrate:
- Decrease build time of our application. (It was the main cause).
- Also
jspm install
takes much more time thannpm install
. - Many config files for SystemJS and JSPM. For Webpack you can use just one main config file, and you can use some separate config files for specific builds using inheritance and merge them.
We mostly use rollup to publish package onto NPM. For most all other use cases, we use the Meteor build tool (probably 99% of the time) for publishing packages. If you're using Node on FHIR you probably won't need to know rollup, unless you are somehow working on helping us publish front end user interface components using FHIR. That being said, we have been migrating away from Atmosphere package manager towards NPM. As we continue to migrate away, we may publish other NPM packages using rollup.
Pros of AWS CloudFormation
- Automates infrastructure deployments43
- Declarative infrastructure and deployment21
- No more clicking around13
- Any Operative System you want3
- Infrastructure as code3
- Atomic3
- CDK makes it truly infrastructure-as-code1
- Automates Infrastructure Deployment1
- K8s0
Pros of Webpack
- Most powerful bundler308
- Built-in dev server with livereload182
- Can handle all types of assets142
- Easy configuration87
- Laravel-mix21
- Overengineered, Underdeveloped4
- Webpack-Encore2
- Makes it easy to bundle static assets2
- Redundant1
- Better support in Browser Dev-Tools1
Sign up to add or upvote prosMake informed product decisions
Cons of AWS CloudFormation
- Brittle4
- No RBAC and policies in templates2
Cons of Webpack
- Hard to configure12
- No clear direction3
- Spaghetti-Code out of the box2
- SystemJS integration is quite lackluster2
- Loader architecture is quite a mess (unreliable/buggy)2
- Fire and Forget mentality of Core-Developers2