Skip to content

Implemented AWS IAM policies to enforce least privilege access between development and production EC2 environments using resource tags.

Notifications You must be signed in to change notification settings

dalecodin/aws-iam-cloud-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 

Repository files navigation

AWS-IAM-Cloud-Security

Implemented AWS IAM policies to enforce least privilege access between development and production EC2 environments using resource tags.

AWS Cloud Security with IAM

πŸ“Œ Project Overview

This project demonstrates how AWS IAM can be used to control access to cloud resources using least privilege principles. I created 2 separate production and development EC2 environments and restricted user access using IAM policies with resource based conditions.

πŸ› οΈ Services & Tools Used

β€’ AWS Identity and Access Management (IAM)

β€’ Amazon EC2

β€’ IAM Policies (JSON)

β€’ IAM Users & User Groups

β€’ Resource Tagging

🎯 Project Goals

β€’ Separate production and development environments

β€’ Restrict intern access to development resources only

β€’ Prevent accidental changes to production infrastructure

β€’ Practice real-world cloud security controls

βš™οΈ Architecture Overview

β€’ Two EC2 instances:

β€’ Production EC2 (Env = production)

β€’ Development EC2 (Env = development)

β€’ Custom IAM policy using tag based conditions

β€’ IAM user group for interns

β€’ IAM user assigned to intern group

β€’ AWS account alias for simplified login Screenshot 2025-11-26 092300

Screenshot 2025-11-26 103203

πŸ“œ IAM Policy (JSON)

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": "ec2:*",
      "Resource": "*",
      "Condition": {
        "StringEquals": {
          "ec2:ResourceTag/Env": "development"
        }
      }
    },
    {
      "Effect": "Allow",
      "Action": "ec2:Describe*",
      "Resource": "*"
    },
    {
      "Effect": "Deny",
      "Action": [
        "ec2:DeleteTags",
        "ec2:CreateTags"
      ],
      "Resource": "*"
    }
  ]
}
Screenshot 2025-11-26 094216

πŸ§ͺ Testing & Validation

β€’ Logged in as IAM intern user

β€’ Attempted to stop production EC2 instance β†’ ❌ Access denied

β€’ Successfully stopped development EC2 instance β†’ βœ… Allowed

β€’ Verified IAM permissions worked as intended Screenshot 2025-12-12 111826

Screenshot 2025-12-12 112327

πŸ” Security Concepts Demonstrated

β€’ Least privilege access

β€’ Environment isolation (dev vs prod)

β€’ Tag-based access control

β€’ IAM user & group management

β€’ Policy testing and validation

About

Implemented AWS IAM policies to enforce least privilege access between development and production EC2 environments using resource tags.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published