ā Why I Built This Project (Project 3 of 6 ā CASBāLike Monitoring with GuardDuty + CloudTrail)
Instead of studying cloud security concepts in isolation, Iām using real job descriptions as a roadmap and building handsāon projects that map directly to what employers expect in cloud security, cloud operations, and security engineering roles.
This 6āpart series focuses on practical skills such as:
- Identity hardening and MFA enforcement
- IAM governance and access reviews
- Continuous monitoring of cloud resources
- Log analysis, audit readiness, and evidence gathering
- Guard rails at scale using AWS Organizations + Service Control Policies (SCPs)
- Threat detection, anomaly monitoring, and incident triage
Each project reflects realāworld responsibilities, not just theoretical learning.
š Project Sequence
š Part 1: AWS IAM Hardening ā strengthening identity boundaries and improving authentication hygiene
š Part 2: Cloud Security Posture Management (CSPM) using Security Hub + AWS Config
š Part 3: (this project) ā CASBāLike Monitoring with GuardDuty + CloudTrail, focusing on realātime detection, safe anomaly generation, delegated administrator behavior, and understanding how AWS produces threat intelligence findings
š Why This Progression Matters
Modern cloud security teams approach protection in layers.
Identity first ā Posture second ā Threat Detection next
Project 3 builds on the earlier foundations by adding behavioral visibility, anomaly detection, and eventādriven alerts core fundamentals used by SOC analysts, detection engineers, threat hunters, and cloud security specialists.
This lab simulates a lightweight Cloud Access Security Broker (CASB) workflow inside AWS using managed services, allowing you to explore:
- CloudTrail event logging & integrity
- GuardDuty findings (sample + real)
- Safe adversary simulation
- Regionābased anomaly detection
- Delegated administrator restrictions
- Cleanup for cost control
A handsāon, beginnerāfriendly guide to setting up threat monitoring in AWS, generating safe test activity, interpreting findings, troubleshooting delegated admin errors, and cleaning the environment properly.
Table of Contents
- Introduction
- What You Will Build
- Prerequisites
- Step 1 ā Enable CloudTrail With Secure Settings
- Step 2 ā Enable GuardDuty (Threat Detection)
- Step 3 ā Generate Safe Test Activity
- Step 4 ā Review GuardDuty Findings
- Step 5 ā Cleanup to Avoid Costs
- Final Thoughts
Introduction
Cloud security monitoring doesnāt have to be complicated and you donāt need enterprise CASB tools to begin learning how threat detection works in the cloud.
This beginnerāfriendly lab shows how to simulate CASBālike monitoring using AWS CloudTrail + GuardDuty, while keeping everything free or extremely lowācost.
Youāll generate safe test activity, view detections, and learn how these tools help security teams identify risky behavior inside AWS environments.
This guide also includes troubleshooting notes and real issues encountered during setup (manual KMS encryption, delegated admin restrictions, etc.) so beginners know what to expect.
What You Will Build
By the end of this lab you will have:
- CloudTrail logging your AWS API activity
- GuardDuty analyzing logs for threats
- Sample findings + real findings from safe test events
- A lightweight, CASBālike monitoring workflow
- A clean environment with no ongoing costs
Prerequisites
- AWS account
- IAM user or role with adminālevel permissions
- A single region chosen for the lab (recommended:
us-east-1) - Optional: AWS CLI installed
Step 1 ā Enable CloudTrail With Secure Settings
CloudTrail records API activity across your AWS account. Itās the backbone for detection and threat monitoring.
ā Create a CloudTrail Trail
- Open CloudTrail ā Trails ā Create trail
- Name your trail:
casb-guardduty-lab-trail
- Create a new S3 bucket for logs
-
Manually enable:
- SSEāKMS encryption (AWS managed key)
- Log file validation
š Many beginners miss this ā CloudTrail does NOT always enable SSE-KMS or validation by default depending on UI version.
These settings add integrity and confidentiality protections to your logs.
Step 2 ā Enable GuardDuty (Threat Detection)
GuardDuty analyzes CloudTrail logs, VPC Flow Logs, and DNS logs for suspicious or malicious activity.
ā Enable GuardDuty
- Open GuardDuty
- Click Enable GuardDuty
- If GuardDuty creates a Delegated Administrator, note it for cleanup later
You now have threat detection running automatically.
Step 3 ā Generate Safe Test Activity
To make this a real learning experience, youāll generate safe events that CloudTrail and GuardDuty can analyze.
š¹ Option A - Generate AWS Sample Findings
In GuardDuty:
- Open the Actions menu
- Choose Generate sample findings
These simulated attacks help you practice incident triage.
š¹ Option B - Generate Real CloudTrail Events
1. Console Login Events
- Log out and back into the AWS console
- Create a test IAM user and intentionally fail login attempts
These appear as ConsoleLogin events in CloudTrail.
2. Activity From an Unusual Region
- Switch from your home region to
eu-west-1orap-southeast-1 - Open services or start to create resources (cancel before provisioning)
CloudTrail logs these actions with the region included.
Step 4 ā Review GuardDuty Findings
Now you get to see your CASBālike visibility in action.
š View All Findings
Go to:
GuardDuty ā Findings
You may see findings such as:
- UnauthorizedAccess:IAMUser/ConsoleLogin
- Recon:EC2/PortProbe
- AnomalousBehavior findings for unusual logins
- Sample simulated threats such as:
- IAM compromise sequences
- EC2 compromise
- Kubernetes or ECS compromise
If GuardDuty detects unusual database access, you may see:
A user successfully logged into an RDS database in an unusual way.
Severity: HIGH
These help you understand what real-world threat detection looks like.
Step 5 ā Cleanup to Avoid Costs
This lab is cheap, but not free if left running for days or months.
ā REQUIRED: Remove Delegated Administrator First
You cannot disable GuardDuty until the delegated admin is removed.
- Open GuardDuty ā Settings ā Accounts
- Click Disable delegated administrator
- Confirm
Now you can safely disable GuardDuty.
ā Disable GuardDuty
- Open GuardDuty ā Settings
- Choose Disable GuardDuty
ā Delete CloudTrail Trail
- Open CloudTrail ā Trails
- Select your trail
- Delete it
ā Remove S3 Logs Bucket
- Empty the bucket
- Delete the bucket
ā Delete Test IAM User
If you created one for failed login testing.
Final Thoughts
This project gives you real handsāon experience with:
- Logging
- Threat detection
- Cloud security monitoring
- CASBālike visibility inside AWS
- Proper cleanup and cost management
Itās a strong beginner ā intermediate cloud security project you can showcase in a portfolio or LinkedIn post.
š¤ Connect
If you enjoyed this article or youāre also learning DevOps, Linux, Security, or Cloud automation, Iād love to connect, share ideas, and learn.
š¬ Feel free to reach out or follow my journey on š LinkedIn



Top comments (0)