How to Deploy an Amazon Linux EC2 Instance in AWS using Terraform

In this story, we will learn how to deploy an Amazon Linux EC2 Instance (VM) in AWS using Terraform.

Note: updated on 24-March-2022 to add support for Amazon Linux 2 Kernel 5.x AMI

Prerequisite #1: AWS Credentials

--

--

--

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Learning IaC: Part One — Terraform

How To Operate AWS Services Using AWS CLI

Integrating LDAP Server with AssetSonar

CROCO Swap  — Bringing DeFi infrastructure to Binance SmartChain

The story behind our Container Delivery Pipeline and dev-friendly operations

Package Delivered: Accelerate Your DBT Project Initialization

Kubernetes Master Components: Etcd, API Server, Controller Manager, and Scheduler

Headless CMS (Contentful) and NextJS: How to create a modern React application? Part 1.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Guillermo Musumeci

Guillermo Musumeci

Certified AWS, Azure & GCP Architect | HashiCorp Ambassador | Terraform SME | KopiCloud Founder | ex-AWS | Entrepreneur | Book Author | Husband & Dad of ✌

More from Medium

How to Deploy a CentOS Linux EC2 Instance in AWS using Terraform

Basic Configuration How to Provision Amazon Web Services (AWS) Resources via Terraform Cl

Automate Infrastructure as Code with Terraform Cloud & GitHub

Format and Mount a VM disk using Terraform in Azure