Skip to content

GitHub Actions with AWS and Terraform

Level:Intermediate
Time:2-3 hours
Cost:medium
Works locally:No
Cloud creds:Yes
Cleanup:No
Reviewed:2026-05-30
Validation:terraform fmt -check

GitHub Actions pipeline for AWS IaC and container deployment.

Outcome Passing pipeline run plus scan/deploy evidence
Tools used Node.js, Docker, Terraform, GitHub Actions, AWS
Best fit Intermediate - 2-3 hours
Student workstation Repository files CI/CD pipeline AWS account Validation proof
  • Install or review: Node.js, Docker, Terraform, GitHub Actions, AWS.
  • Use your own cloud account credentials and keep them out of commits.
  • This project expects cloud resources, so verify budget alerts and cleanup first.
  • Open the safety guide before running commands that create infrastructure.
Cost and credential stance

Cost risk is medium. Cloud target: AWS. Cloud credentials needed: Yes. Always use your own account, never commit secrets, and confirm cleanup before creating paid infrastructure.

Use this flow before you run commands:

  1. Read the cost and credential warning above.
  2. Review the validation, troubleshooting, cleanup, and portfolio proof sections below.
  3. Follow the original project guide preserved near the bottom of this page.
  4. Return to the validation and cleanup checks before you capture portfolio evidence.

Run the project validation command before and after meaningful changes:

Terminal window
terraform fmt -check
  • Run terraform fmt -check first so local tooling issues are visible early.
  • If a command fails, check tool versions, working directory, and required environment variables.
  • For cloud failures, confirm account identity, region, quotas, and least-privilege IAM.
  • For pipeline failures, check repository secrets, runner permissions, and pinned action versions.

No dedicated cleanup command was detected in the project README. Treat this as a warning: before provisioning anything, write down the exact delete, destroy, or rollback steps for your environment.

  • Validation command output: terraform fmt -check
  • Screenshot or terminal proof: Passing pipeline run plus scan/deploy evidence
  • Notes explaining what changed, what failed, and how you fixed it
  • Cleanup evidence, especially for cloud or Kubernetes resources

The original README content is preserved here for lab-specific commands and context. Headings are intentionally demoted so the page outline stays focused on the standard lab flow.

Github-actions Logo

👉 Repository to demonstrate Infrastructur-As-Code using:
Section titled “👉 Repository to demonstrate Infrastructur-As-Code using:”
Github Actions Pipelines
AWS
Terraform + Terraform Cloud

Task Logo

🛡️ 2026 DevSecOps Enhancements (What You Will Learn)
Section titled “🛡️ 2026 DevSecOps Enhancements (What You Will Learn)”

This repository leverages Terraform Cloud within the CI/CD pipeline, fulfilling a critical DevSecOps requirement: Secure Remote State Management. By utilizing Terraform Cloud (or an S3 backend with DynamoDB locking and KMS encryption), we guarantee that sensitive infrastructure state files (which often contain plaintext secrets, database passwords, and private IPs) are never committed to version control or left exposed on a Jenkins/GitHub Actions runner.

Virtual Private Cloud (VPC)
Public Subnets
EC2 Instance
Internet Gateways (IG)
Security Groups (SG)
Elastic Container Registry (ECR)
Elastic Container Service (ECS) + Fargate
Auto Scaling Group (ASG)

ECS-ECR-AWS Logo

Project-info Logo

Copyright © 2022, Harshhaa Reddy. Released under the GNU Affero General Public License v3.0.

Use the guide first.

The full learning flow stays on this page. Open GitHub only when a step asks you to inspect code, fork the lab, or download source assets.