Introduction to Infrastructure as Code with Terraform on AWS
Write your first HCL configuration and deploy a DynamoDB table to AWS using Terraform's init, plan, and apply workflow.

Lab overview
Infrastructure as Code (IaC) allows engineers to define and manage cloud resources through configuration files rather than manual console operations. This approach brings the same version control, peer review, and repeatability that software development teams rely on to infrastructure management. Terraform, developed by HashiCorp, is one of the most widely adopted IaC tools. It uses a declarative model where you describe the desired end state of your infrastructure, and Terraform determines the steps needed to reach that state. Its provider-based architecture supports AWS, Azure, GCP, and hundreds of other platforms through a single consistent workflow.
In this lab, you will write your first Terraform configuration in HashiCorp Configuration Language (HCL) to define a DynamoDB table on AWS and deploy it using Terraform's core workflow - init, plan, and apply.
Objectives
Upon completing this beginner level lab, you will be able to:
- Write a Terraform configuration file in HCL to define an AWS resource
- Initialize a Terraform project and download provider plugins using terraform init
- Preview infrastructure changes using terraform plan and deploy them using terraform apply
- Inspect the Terraform state file to understand how Terraform tracks managed resources
Who is this lab for?
This lab is designed for:
- Cloud beginners who want their first hands-on experience with Infrastructure as Code
- Aspiring DevOps engineers looking to learn Terraform fundamentals for AWS
- Terraform Associate candidates preparing for the certification exam
Verified against your live environment
An automated validation engine inspects your actual resources and configurations as you work. Completion means the task was performed — not multiple choice, real-world proficiency.
More labs like this
Creating a Web App on Azure App Service using Azure Portal
Learn how to create, configure, and deploy a web application using Azure App Service through the Azure Portal's interface.
Understanding Terraform Resources and Data Sources on Azure
Create Azure resources with Terraform, query existing infrastructure using data sources, and combine both patterns in a single configuration.
Deploying a Linux VM in Azure using Terraform
Learn to deploy an Azure Linux VM using Terraform while exploring advanced concepts like complex variables, data sources, dependencies, and multi-file configurations.
Related reading
Environment
Every lab includes
- Real environment, pre-credentialed
- Automated checks on every step
- Isolated sandbox, auto cleanup
- AI-recommended next steps
Lab curriculum
- 01
Logging into the AWS CLI
- 02
Write Your First Terraform Configuration File for AWS
1 automated check
- 03
Deploy a DynamoDB Table with Terraform Init Plan and Apply
1 automated check
Not the lab you were looking for?
Browse 150+ hands-on labs across AWS, Azure, Kubernetes, Docker, and cloud security.