Detect, Contain and Prove It on AWS: GuardDuty, Security Hub CSPM, AWS Config and Automated Response

Take the role of the cloud security engineer who turns a neglected AWS account into one that notices threats and misconfigurations, fixes the safe ones in minutes, contains a compromised instance or leaked key with a person in the loop, and proves all of it to an auditor with queries: GuardDuty, AWS Config, Security Hub CSPM, EventBridge, Step Functions and Athena, built with Terraform and Python.

Cloud Security Engineer. Advanced.

What you will build and explain

  • Enable or adopt GuardDuty, AWS Config and Security Hub CSPM with Terraform, and explain what each reads, produces and costs.
  • Write tag-scoped AWS Config rules, a custom Guard rule and automatic remediation with SSM runbooks, and measure a misconfiguration's time to fix.
  • Route findings with EventBridge by source, type, severity and resource tag, and separate what notifies a person from what starts a workflow.
  • Build Step Functions workflows that preserve evidence, isolate an instance or deactivate a key at once, and wait for a person's approval before destructive steps.
  • Trigger a real GuardDuty finding safely with a documented test domain and follow it through containment and approval.
  • Keep the finding list meaningful with Security Hub CSPM standards, workflow status and automation rules.
  • Answer time to detect and time to contain with Athena over an encrypted findings archive, and remove everything the lab created without touching anything it did not.

Before you begin

  • The AWS console and CLI with a signed-in profile; reading IAM and resource policies; VPCs, security groups and S3 Block Public Access; Terraform at the level of plan and apply; reading Python and JSON with jq. GuardDuty, AWS Config, Security Hub CSPM, SSM Automation, EventBridge, Step Functions and Athena are taught
  • An AWS account where you may enable GuardDuty, AWS Config and Security Hub CSPM and create IAM roles, not administered by another account for those services; the AWS CLI v2 signed in to it; Terraform 1.17; jq; Python 3.12 or later for the tests
  • A budget for AWS charges: GuardDuty and Security Hub CSPM have 30-day free trials per account and Region; outside them, detection services bill for activity across the whole account

Who this is for

For cloud and security engineers who use the AWS console and CLI, read IAM policies and Terraform, and know VPCs, security groups and S3 Block Public Access, and want an account that notices threats and misconfigurations, fixes the safe ones in minutes, contains a compromised instance or a leaked key with a person approving the destructive step, and proves it to an auditor with queries, in an account shared with other teams.

Curriculum

Learning topics (17)
  1. Read the incident log and prepare an account the lab may watch but never break

    Before the first command, three questions need a definite answer:

  2. Follow a misconfiguration to its fix and a threat to its containment

    Marlowe Freight's account had a detector nobody read, buckets nobody checked and no record of what had been fixed or when. This page explains the system built in answer, as one connected design: what watches the account and what each part reads, how a misconfiguration is found and fixed, how a finding is routed, how an instance or a key is contained with a person in the loop, where the evidence goes, and how all of it is kept from touching anything the lab does not own. The d

  3. Two roots, local state, and adopting security services someone else switched on

    Most Terraform projects own everything they touch. This one cannot. GuardDuty, AWS Config and Security Hub CSPM exist at most once per account and Region, and in a shared account someone may have switched them on long before you arrived. Turning them off, or reconfiguring them, would change other people's monitoring without telling them. This lesson covers three things:

  4. What GuardDuty reads, what it finds and what it cannot see

    The second incident in Marlowe's log is the one that stings: GuardDuty did report the leaked key, within minutes, and the finding sat unread for nineteen hours. Detection was not the problem. Nothing happened after detection. Before this project can make findings act, you need to know what GuardDuty actually looks at, what a finding tells you, how and when findings leave GuardDuty, and where its view stops.

  5. Recording what exists, judging it with rules, and paying for what you record

    The manifests bucket was public for eleven days. No attacker was needed for that to be a problem, and GuardDuty, which watches behaviour, had nothing to say: nobody had to do anything suspicious for the bucket to be readable. The question "is this resource configured the way it should be?" is a different question, and AWS Config answers it. This lesson explains how Config sees a resource, how a rule judges it, and why the lab records so little.

  6. Fixing a misconfiguration in minutes, and only the ones you own

    Finding the open SSH port on Marlowe's forgotten instance took a cost review. Finding it with a Config rule would take minutes. But a finding still waits for someone to act on it, and the second incident showed how long that can be. For a small set of misconfigurations the fix is mechanical, safe to repeat and has no business decision in it. Those can be fixed by Config itself. This lesson covers how, which ones, and how the fix is kept away from resources the lab does not ow

  7. Standards, controls, consolidated findings and the finding's workflow

    Marlowe now has GuardDuty findings in one place and Config results in another, and the auditor's first question is not about either. The auditor wants to know how the account compares with a recognised standard. Security Hub CSPM answers that. It also collects GuardDuty's findings, so one list holds threats and posture in one format. This lesson explains standards, controls and their findings, how a finding is marked as handled, and the two automation rules the lab adds.

  8. Which findings wake a person, which start a workflow and which are only kept

    The leaked key's finding sat unread for nineteen hours because a finding, on its own, goes nowhere. GuardDuty and Security Hub CSPM produce findings; something has to decide what each one should cause. In this project that something is five Amazon EventBridge rules. This lesson teaches how EventBridge matches events, then reads the five patterns and the reasoning behind each threshold.

  9. Preserve, isolate, ask, then stop: a containment workflow with a person in it

    The fourth incident went wrong in a very ordinary way. An engineer saw an instance behaving strangely, did the reasonable-sounding thing and terminated it, and the volume holding the only evidence went with it. This lesson builds the opposite reflex into a workflow:

  10. A leaked access key, deactivated in a minute and deleted on approval

    Nineteen hours: the leaked key's mining ran from the moment someone found it in a public repository until a person read GuardDuty's finding. Most of that time was waiting. This lesson builds a workflow that does the safe part of the response within a minute of the finding, without waiting for anyone, and keeps the irreversible part for a person.

  11. Time to detect and time to contain, answered by a query

    The fifth incident was not a breach. It was a question: "How quickly do you fix misconfigurations and contain threats?" Marlowe could not answer, because nothing had been written down in a form anyone could count. This lesson builds the record:

  12. What account-wide detection costs, and why it bills for everything

    Most of this project costs cents. The detection services are the exception, and they do not bill the way the rest of AWS does. You do not pay for a detector's existence; you pay for what it looks at. That means you pay for the whole account's activity, not only the lab's. This lesson works through what each part costs, what drives it, and the decisions in the lab that keep it small. Prices change. The figures here are AWS's published on-demand examples, checked on 2026-11-10;

  13. From one account to an organisation: delegated administrators, all Regions and the new Security Hub

    The lab is deliberately small: one account, one Region, one operator, a week of evidence. Each of those limits was a choice made for learning, and each would be a gap in a real company. This lesson goes through what changes when the design meets an organisation, why, and what it costs. Nothing here is built in the lab; it describes alternatives, not features the project contains.

  14. Turn on detection, fix and contain on purpose, and answer the auditor

    This runbook takes an AWS account in which this project has created nothing yet to the following state:

  15. Diagnose a fix that never comes, a workflow that stops and a finding that never arrives

    When detection or response breaks, it usually breaks quietly: a rule that evaluates nothing, a workflow that never starts, an archive with a gap. The scenarios in this section practise finding out why, the way an interviewer would ask it. This page says where the evidence lives and how to use the scenarios.

  16. Explain the design and defend every detection, remediation and containment decision

    A security engineering interview about this project will test whether you understand why it is built this way, not whether you remember file names. The questions in this section are about the system's decisions: what each service sees, which fixes are automatic, how containment is ordered, how a person decides, how the evidence answers an auditor, and what would change at scale.

  17. Remove what the lab created and leave what it adopted

    Run this page whenever you stop: at the end of the runbook, after a failed apply, or halfway through a milestone. Each step works from whatever state the lab is in. Commands run in a terminal in your copy's source/ folder, signed in to the lab account as in the runbook.

Practical build steps (9)
  1. Prepare your machine, your sign-in and your settings

    Before anything exists in AWS you need three things: tools that work, a sign-in to the account you mean, and the lab's settings written down where every script and both Terraform roots can read them. Nothing in this milestone creates anything in AWS or costs anything.

  2. Check which security services the account already has

    GuardDuty, AWS Config and Security Hub CSPM are account-wide and one per Region. Before Terraform creates anything, the lab asks the account which of them already exist, and whether another account administers them. This milestone only reads.

  3. Deploy the platform that watches and responds

    The platform root is everything that watches and responds:

  4. Deploy the lab instance, bucket and user

    The resources the exercises misconfigure and the workflows contain:

  5. Break two settings and watch them fixed

    Two deliberate misconfigurations on lab resources: SSH open to the world on a group attached to nothing, and bucket-level Block Public Access turned off on the manifest bucket (with no policy granting anything). Each script measures how long AWS Config takes to notice and the runbook to fix it.

  6. Contain the lab instance after a real GuardDuty finding

    A DNS lookup of GuardDuty's documented test domain from the lab instance produces a real high-severity finding. EventBridge starts the instance workflow. The workflow preserves evidence, isolates the instance and asks you whether to stop it.

  7. Contain a leaked key, deny, and refuse what is not yours

    No safe action makes GuardDuty report a leaked key, so this milestone starts the credential workflow with a finding shaped like GuardDuty's, naming a real key on the lab's permission-less user. Then it shows the outcomes a real finding is too slow or too rare to produce: a denial, a timeout, another team's resource, and GuardDuty's sample findings.

  8. Answer the auditor with two queries

    The fifth incident was a question nobody could answer: how fast are threats contained? Everything the earlier milestones did is now in the evidence bucket:

  9. Remove what the lab created and check for leftovers

    The lab's resources keep billing until they are gone, and the detection services bill for the whole account. This milestone destroys both roots in the right order, deletes the evidence snapshots Terraform never created, and checks that nothing the lab made is left. Services the lab adopted stay exactly as they were.

Access

Learning Access: INR 199 plus 18% GST. Source Pack: INR 399 plus 18% GST. 90 days of online access. No auto-renewal.

Cloud costs and boundaries

This project enables account-wide security services in your own AWS account: Amazon GuardDuty, AWS Config and AWS Security Hub CSPM, plus Step Functions, Lambda, Firehose, Athena, KMS, SNS, SQS and one small EC2 instance. GuardDuty and Security Hub CSPM offer 30-day free trials per account and Region; outside them, and for AWS Config always, they bill for activity across the whole account, not just the lab. A session of the runbook costs under one dollar with the trials. AWS charges are billed by AWS and are separate from project access. No alarm in this project limits spending: destroy what the lab created when you finish and run the leftovers check. Marlowe Freight, its buckets, its key and its findings are fictional and synthetic. This is a learning reference, not a hosted service or a production deployment.

Licence and completion

Vectametric Project Source Licence (2026-09-27): lawfully obtained source may be copied, modified and deployed for personal learning and interview preparation, including personal portfolio demonstrations with attribution. These permissions continue after online access expires. Do not resell or redistribute the Source Pack or its original source files, unchanged or modified. Commercial or client production use requires separate written permission. Third-party components, such as Terraform, its AWS provider, boto3 and moto, retain their own licences. See LICENSE.txt and the Project Source Licence section of the site Terms for the full rules.

Questions about projects

Do I need a cloud account?

You can read the project material without deploying it. Running a cloud build requires the accounts, permissions and tools listed in that project's prerequisites. Deployment runs in your environment, not in a hosted Vectametric lab.

Can I read the code with Learning Access?

Yes. Learning Access includes the online source-file browser and explanations. The Source Pack adds the downloadable reference repository where available. The project's licence governs use of the source.

Are cloud charges included?

No. Cloud and CI usage are separate. Read the project's cost notice, set a budget and stop deadline, and follow its destruction and leftover-resource checks.

Does the project include troubleshooting and interview preparation?

The project curriculum lists the available scenarios and interview topics. These focus on understanding the architecture and explaining decisions; they are not a promise of particular interview questions or a job.

How long can I use the project?

The project page and checkout show the online access period for your selected plan. Access does not auto-renew. Downloaded source remains subject to its licence; future releases are not automatically included.

Review the Terms and No-Refund Policy before confirming access. All sales are final; Vectametric does not offer refunds.

This website is operated by VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED, operating as Vectametric.

Corporate Identity Number (CIN): U85499KA2026OPC229822. GSTIN: 29AAMCV8281D1ZS. Registered office: RS NO/38/2A/1 BASTAND, ROAD MAHANTESH NAGAR, Ramdurg, Ramdurg, Belgaum- 591123, Karnataka.

Queries and grievances: Prajval Honnungar, Grievance Officer and Data Protection Contact.

Telephone: +91 94800 09310. Support: support@vectametric.com. Grievances: support@vectametric.com.

Copyright 2026 VECTAMETRIC EDTECH (OPC) PRIVATE LIMITED. All rights reserved.

Vectametric home · Roadmaps · Vecta IT Exams · Vecta Government Exams · Vecta Banking & Finance Exams · Vecta Entrance Exams · About us · Contact · Privacy Policy · Terms and Conditions · No-Refund Policy