Sitemap
Dulaj Thilakasiri

Dulaj Thilakasiri

I’m a Software Engineer writing articles to help software development, cloud computing, DevOps, trending technical topics, and fundamentals for beginners.

What is IaC ?

2 min readMar 28, 2026

--

Infrastructure as Code (IaC)

Infrastructure as Code (IaC) is a modern approach to managing and provisioning computing infrastructure using code instead of manual processes. Traditionally, setting up servers, networks, and databases required manual configuration, which was time-consuming and error-prone. IaC solves this by allowing developers and DevOps teams to define infrastructure in configuration files that can be version-controlled, reused, and automated.

With IaC, infrastructure becomes repeatable, consistent, and scalable. It also integrates seamlessly with CI/CD pipelines, enabling faster and more reliable deployments.

There are Infrastructure as Code (IaC) services available across major cloud providers such as Amazon Web Services, Microsoft Azure, Google Cloud Platform, and Oracle Cloud Infrastructure. In this article, we will focus on how IaC is implemented within AWS and the tools it provides to manage cloud infrastructure efficiently.

Press enter or click to view image in full size

What is AWS Infrastructure as Code (AWS IaC)?

AWS Infrastructure as Code refers to the use of code and automation tools to provision and manage resources on Amazon Web Services (AWS). Instead of manually creating services like EC2 instances, S3 buckets, or databases through the AWS Management Console, developers can define these resources using code.

AWS IaC allows teams to:

  • Automate infrastructure deployment
  • Maintain consistency across environments
  • Reduce human errors
  • Scale infrastructure efficiently

By using AWS IaC tools, organizations can manage complex cloud environments in a more efficient and controlled manner.

AWS IaC Models

AWS provides two primary models/tools for implementing Infrastructure as Code.

1. AWS CloudFormation

AWS CloudFormation is a service that allows you to define and provision AWS infrastructure using declarative templates written in JSON, YAML or XML.

Get Dulaj Thilakasiri’s stories in your inbox

Join Medium for free to get updates from this writer.

In this model:

  • You describe what your infrastructure should look like
  • AWS automatically figures out how to create and configure it

Key Features:

  • Declarative approach
  • Template-based (JSON/YAML/XML)
  • Automatic dependency handling
  • Stack-based resource management

Example Use Case:
Creating a full environment (EC2, RDS, VPC) using a single template file.

2. AWS Cloud Development Kit (CDK)

AWS CDK is a modern IaC framework that allows developers to define cloud infrastructure using familiar programming languages like JavaScript, TypeScript, Python, Java, and C#.

In this model:

  • You write infrastructure using code
  • CDK converts it into CloudFormation templates behind the scenes

Key Features:

  • Imperative programming approach
  • Uses real programming languages (Like Python, Ruby)
  • Reusable components (constructs)
  • Better suited for developers

Example Use Case:
Building complex infrastructure with loops, conditions, and reusable modules.

In conclusion, Infrastructure as Code has transformed the way we manage cloud environments by making them more automated, consistent, and scalable. With powerful tools provided by Amazon Web Services, implementing IaC becomes an essential practice for building efficient and reliable modern applications.

By : Dulaj Thilakasiri

See you in another article…

--

--

Dulaj Thilakasiri
Dulaj Thilakasiri

I’m a Software Engineer writing articles to help software development, cloud computing, DevOps, trending technical topics, and fundamentals for beginners.