AWS CloudFormation
Learn about AWS CloudFormation, an essential Infrastructure as a code service.
Infrastructure as a code
While the AWS Cloud is the answer to most of our deployment solutions, manually provisioning hundreds of services and cloud infrastructures doesn’t sound very efficient. This is where infrastructure as a code comes into play. Infrastructure as a code (IaC) means managing and provisioning application infrastructure using code. By using IaC, we have changed the application deployment process from buying and configuring hardware to writing infrastructure configuration files. CloudFormation is the service for provisioning AWS infrastructure using code.
Benefits of IaC
- Deploying infrastructure on cloud service consoles is prone to manual errors, whereas writing IaC allows multiple developers to collaborate, review, and version control the infrastructure.
- IaC allows developers to use preexisting templates and documentation to create verified and tested infrastructure.
- IaC allows IT, admins, and architects to provision consistent and tested hardware in all their deployments.
- It provides for compliance and security control in an organization. For example, a cloud architect can create a reusable piece of code that provisions secure infrastructure in line with the organization’s standards. This same code can be reused across all the teams in the organization to provision organization-compliant infrastructure.
- IaC improves the overall efficiency of provisioning and maintaining hardware. Integrating IaC configurations with continuous integration and continuous deployment (CI/CD) can further automate and enhance the process of infrastructure provisioning.
AWS CloudFormation
AWS CloudFormation is a service that allows us to run CloudFormation templates to provision AWS resources. CloudFormation templates are a declarative way of specifying AWS infrastructure.
Basic components
- The CloudFormation template is the JSON or YAML code file used as a blueprint by CloudFormation to provision AWS infrastructure. We define a template (a .json or .yaml code file) and run the file in CloudFormation, which takes care of the rest.
- A CloudFormation stack is a collection of all AWS resources created by a single CloudFormation template.
Features
- CloudFormation is a free-to-use service. We only pay for the infrastructure created using CloudFormation.
- We can use the identifier in a CloudFormation stack to track and estimate the costs of all resources created by a particular stack.
Get hands-on with 1400+ tech skills courses.