Provisioning Infrastructure as Code—From Zero to Hero

Provisioning Infrastructure as Code—From Zero to Hero
Provisioning Infrastructure as Code—From Zero to Hero

CLOUD LABS



Provisioning Infrastructure as Code—From Zero to Hero

In this Cloud Lab, you’ll use IAC with AWS SAM, CloudFormation, and Terraform to create an app that interacts with AWS services.

12 Tasks

beginner

2hr

Certificate of Completion

Desktop OnlyDevice is not compatible.
No Setup Required
Amazon Web Services

Learning Objectives

Proficiency in deploying a serverless application using AWS SAM
Hands-on experience creating and managing AWS resources using CloudFormation templates
Hands-on experience provisioning and managing cloud resources using Terraform
Hands-on experience deploying a functional ToDo-list React application that interacts with the IAC-deployed AWS infrastructure
Hands-on experience building a serverless application with IAC using AWS DynamoDB, Lambda, and API Gateway

Technologies
Lambda logoLambda
S3 logoS3
DynamoDB logoDynamoDB
API Gateway logoAPI Gateway
Terraform logoTerraform
CloudFormation logoCloudFormation
Cloud Lab Overview

Infrastructure as Code (IaC) gives developers the power to build and deploy services using code, so they don’t have to do much manual work. To make this method work even better, developers break down big, complex architectures into smaller, more manageable pieces. They then write code to create these parts and ensure they connect smoothly with other services.

In this Cloud Lab, you’ll explore the power of Infrastructure as Code (IaC) with AWS CloudFormation, AWS SAM, and Terraform. You will construct a comprehensive infrastructure on the AWS Cloud that includes AWS DynamoDB, Lambda function, and an API Gateway. With these cloud technologies, you will use a ToDo-list React application that interacts with your IaC-deployed infrastructure.

By the end of this Cloud Lab, you’ll be able to use Infrastructure as Code and develop an understanding of its principles and practical application of AWS CloudFormation, AWS SAM, and Terraform in constructing and managing cloud-based architectures.

The following is the high-level architecture diagram of the infrastructure you’ll create in this Cloud Lab:

Architecture diagram
Architecture diagram

Cloud Lab Tasks
1.Introduction
Getting Started
2.AWS CloudFormation
Set Up a CloudFormation Template
Create a Stack
Test the Stack
Clean Up
3.AWS SAM
Set Up a SAM Template
Deploy and Test Application
Clean Up
4.Terraform
Set Up a Terraform Template
Deploy and Test Application
Clean Up
5.Conclusion
Wrap Up
Labs Rules Apply
Stay within resource usage requirements.
Do not engage in cryptocurrency mining.
Do not engage in or encourage activity that is illegal.

Relevant Courses

Use the following content to review prerequisites or explore specific concepts in detail.

Frequently Asked Questions

What is provisioning infrastructure?

Provisioning infrastructure involves setting up and allocating the necessary IT resources, such as servers, storage, networks, and applications, to support a workload or application. Cloud computing often involves creating virtual machines, setting up databases, or configuring networking components using automation tools or scripts.

What is an example of infrastructure as code?

IaC is the set of instructions used to provision and configure resources. Examples of IaC tools are Terraform and AWS CloudFormation. These tools can be used to provision and manage cloud resources like VPCs, EC2 instances, and load balancers.

How to deploy infrastructure as code?

We can deploy IaC by first writing infrastructure specifications and instructions in code (using Terraform or CloudFormation), storing it in version control (like Git), and executing deployment commands (e.g., terraform apply or aws cloudformation deploy). The tool then automatically provisions the defined resources in our cloud environment.

What is an example of infrastructure provision?

An example of infrastructure provisioning is using AWS CloudFormation to deploy a fully configured VPC with subnets, internet gateways, and EC2 instances by defining the infrastructure in a YAML or JSON template. AWS automatically creates and configures the specified resources when the template is deployed, ensuring consistency and repeatability.

What is the difference between infrastructure provisioning and configuration?

Infrastructure provisioning is about setting up the foundation, like creating servers, storage, or networks essentially the physical or virtual resources. Configuration, on the other hand, is about customizing those resources by installing software, setting up applications, or tweaking system settings. For example, provisioning is like launching an EC2 instance, while configuration is installing and setting up an Apache web server.

What is the difference between infrastructure as code (IaC) and IaaS?

IaC and IaaS can be used together but they are two different concepts and should not be confused. IaaS (Infrastructure as a Service) is a cloud service model providing virtual computing resources over the internet. Infrastructure as code (IaC) manages and provides these resources through machine-readable definition files. For example, AWS EC2 is IaaS, while using Terraform to automate EC2 deployment is IaC.

Hear what others have to say
Join 1.4 million developers working at companies like