☁️ Practical 10: Cloud Security

AWS Security

Objective: Understand security practices in the cloud.

🖥️ Method 1: Console / GUI Guide (AWS Management Console)

If you prefer to provision infrastructure manually via the Management Console, follow these steps:

  1. Access IAM: Log in to the AWS Management Console and open the IAM (Identity and Access Management) Dashboard.
  2. Create Role: Click Roles on the left menu, then Create role.
  3. Apply Principle: Select an AWS Service like EC2, search for strict predefined policies like AmazonS3ReadOnlyAccess, and finish building the limited privilege role contextually.
  4. Access KMS: Open the Key Management Service (KMS) dashboard safely.
  5. Create Key: Click Create a key, use symmetric defaults, configure tight usage permissions, and finish creating your cryptographic key effectively.
  6. Access Groups: Open the EC2 Dashboard and thoroughly navigate to Security Groups.
  7. Lock Down Traffic: Create a new security group named WebSecurityGroup and firmly edit its inbound rules to explicitly allow ONLY HTTP (port 80) and HTTPS (port 443) traffic.

🚀 Method 2: Automated Script Guide

For rapid, reproducible deployments, use the provided bash scripts.

🔍 Script Analysis

Script Name Action Performed
10securitydeploy.sh 🟢 Deploys extensively IAM roles dynamically, creates flawlessly custom least-privilege security policies, enables fully automated AWS KMS (Key Management Service) encryption, and strongly applies secure network ACLs/Firewalls.
10securitycleanup.sh 🔴 Detaches meticulously all IAM policies, safely deletes standard and inline roles, aggressively schedules KMS keys for deletion natively, and entirely scrubs cleanly all security groups securely.

🛠️ Usage Instructions

Prerequisites:

  • AWS CLI installed and configured with active credentials.

Execute the following commands from the root directory:

# 1. Navigate to scripts folder
cd scripts/

# 2. Provide execution permission
chmod +x 10_security_deploy.sh 10_security_cleanup.sh

# 3. Deploy sophisticated IAM roles, encryption, and ACLs
./10_security_deploy.sh    

# 4. Zero-residue teardown of all security infrastructure
./10_security_cleanup.sh