Infrastructure as Code: Provisioning EC2 and S3 Using Terraform on AWS
Welcome to another part of my cloud journey! This week was all about stepping into the world of Infrastructure as Code (IaC) using Terraform. Instead of manually clicking through the AWS Console, I learned how to automate the provisioning of infrastructure using code β and it felt like unlocking a superpower. π
π What This Week Was About
I focused on using Terraform to provision two core AWS resources:
An EC2 instance (a virtual machine in the cloud)
An S3 bucket (AWSβs object storage service)
It marked my shift from doing things manually to describing my infrastructure in code β making deployments faster, consistent, and repeatable.
π§ What I Did
Hereβs what I tackled during the week:
Installed Terraform CLI
β Got Terraform set up locally.Configured Terraform to use AWS
β Used an IAM user with programmatic access (access key and secret key).Created core Terraform files
main.tf: Defined my EC2 instance and S3 bucket.variables.tf: Declared input variables for flexibility.
Deployed Infrastructure
- Ran
terraform init,terraform plan, andterraform applyto spin everything up.
- Ran
Bonus: I automated S3 event notifications using Terraform β integrating knowledge from Week 2!
βοΈ Tools I Used
Terraform CLI
AWS IAM User (with appropriate permissions)
EC2 & S3 Services
π Why This Was So Powerful
π Repeatability: I can now recreate environments with a single command.
π Version control: My infrastructure is now stored in code, tracked in Git.
πΌ Real-world skills: This is exactly what DevOps and Cloud Engineers do daily.
Terraform opened a new door β from messy, manual setups to clean, consistent, and scalable infrastructure deployment.


