- Infrastructure as a Code
- No resource are manually created, which is great for control
- The code can be version controlled for example using git.
- Changes to the infrastructure are reviewed through code
- Cost
- Each resource within the stack is stageed with an identifier so you can easily see how much a stack costs you.
- You can estimate the costs of your resources using CloudFormation template.
- Saving strategy: In Dev, you could automation deletion of templates at 5 pm and recreate it at 8 am, safely.
- Productivity
- Ability to destroy and re-create an infrastructure on the cloud on the fly
- Automated generation of Diagram for yuor templates!
- Declarative programming (no need to figure out ordering and orchestration)
- Separation of concern: Create many stacks for many apps, and many layers.
- For Exapmple:
- VPC stacks
- Network stacks
- App stacks
- You do not have to re-invent the wheel.
- Leverage existing templates on the web or simply google it)
- Leverage the documentation.
- CloudFormation is AWS native, and will always contain the latest features for any AWS services.
- CloudFormation is "state based" and AWS will figures out how to reach that state.
- Ansible and Terraform are "instracture based" and be difficult to fully orchestrate your stacks. You need to sometimes make a reference to other resources in order to create.
- Ansible and Terraform have to be updated every time a new Service or API option comes form AWS, which can take a long time.
- For any heavily related AWS work it is better to use CloudFormation.