Skip to Content
Cloud Engineering Academy
15. Multi-Account Governance & FinOps

Centralised security tooling: delegated administrators, auto-enable and a Config aggregator

Run GuardDuty, Security Hub, AWS Config and IAM Access Analyzer for the whole organisation from a dedicated security tooling account, keep the management account out of daily security work, and prove coverage with tested checks.

advanced⏱ 1 h 30 min🟡 Low costSCS-C03SAP-C03SOA-C03

Assumes: .NET 10 LTS · AWS SDK for .NET v4 (AWSSDK.Organizations, AWSSDK.GuardDuty 4.1.x) · CDK v2 (Amazon.CDK.Lib 2.277.0) · Terraform 1.14 / AWS provider v6 · AWS CLI v2 · Region us-east-1 (Harbourline governed Regions eu-west-2, eu-west-1). Verified against official sources on 2026-11-18.

Learning objectives

By the end of this lesson you can:

  • Explain the trusted access plus delegated administrator model and why it keeps security work out of the management account.
  • Design the security tooling account: which services it administers, who can sign in, how findings flow out, and how it is protected.
  • Enable GuardDuty and Security Hub for an organisation with auto-enable, so new accounts are covered from minute one.
  • Create an organisation-wide AWS Config aggregator and explain what an aggregator does and does not do.
  • Decide Regions, protection plans and standards with cost in mind, and mark what is not verified.
  • Run two tested .NET checks: who is the delegated administrator for each service, and is GuardDuty coverage complete in each Region.

Prerequisites

Why this matters in banking

A bank with 80 accounts cannot have 80 teams each decide whether to turn on threat detection. Someone must be able to answer: "Is GuardDuty running in every account and approved Region right now? Who gets paged when it finds something? Can a compromised workload engineer switch it off?" Without central administration, the honest answer to the first is "we hope so", to the second is "whoever owns that account", and to the third is "yes".

The design that answers all three is simple to state: pick one security tooling account, register it as the delegated administrator of each security service, turn on auto-enable so new accounts join automatically, and protect the whole arrangement with an SCP so members cannot opt out. The details are where banks win or lose.

The idea in plain language

Many AWS security services have an organisation mode. You do two things:

  1. In the management account, enable trusted access for the service. This tells AWS Organizations that the service may look at your accounts and act across them.
  2. Register a member account as the delegated administrator for that service. From then on, that account administers the service for the whole organisation: it sees every member's findings, controls which features are on and can add or remove members.

Why not just use the management account? Because it is the most powerful account in the organisation and should have almost nobody signing in. Delegating security administration gives the security team service-level power, not organisation-level power.

Analogy: the bank's group head office owns the building (management account) but appoints a chief security officer with a control room (security tooling account). The CSO's control room can see every branch's cameras and alarms and can arm them, but the CSO cannot move branches or change the bank's ownership. And the branches cannot switch the CSO's cameras off.

Which services support it

ServiceService principal ⚠ VERIFYWhat the delegated admin can do
Amazon GuardDutyguardduty.amazonaws.comEnable GuardDuty in members, auto-enable new accounts, configure protection plans, view all findings
AWS Security Hub (CSPM and unified)securityhub.amazonaws.comEnable in members, manage central configuration policies, standards and finding aggregation
AWS Configconfig.amazonaws.com, config-multiaccountsetup.amazonaws.comCreate an organisation aggregator; deploy organisation rules and conformance packs
IAM Access Analyzeraccess-analyzer.amazonaws.comCreate an organisation-wide analyzer (zone of trust is the organisation)
Amazon Maciemacie.amazonaws.comEnable and manage sensitive-data discovery across members
Amazon Inspectorinspector2.amazonaws.comEnable scanning in members and view findings
AWS CloudTrailcloudtrail.amazonaws.comCreate and manage organisation trails (see Centralised logging)
Amazon Detectivedetective.amazonaws.comManage the behaviour graph for members

Some services require their own call to designate the administrator (for example GuardDuty's enable-organization-admin-account), which also registers the delegation. Follow each service's documentation for the exact call ⚠ VERIFY, and use the C# check below to see what is actually registered.

What problem the AWS service solves

ProblemSolution
New accounts launch with no detectionAuto-enable in the organisation configuration
Engineers could disable detection in their own accountOrganisation-managed members cannot suspend it, plus an SCP denying the disabling APIs
Findings scattered over 80 consolesOne administrator account sees all findings
Standards compliance state per accountSecurity Hub central configuration and aggregated view
"What is configured where?" across accountsAn AWS Config aggregator gives a read-only organisation view

What an aggregator is, and is not

A Config aggregator collects configuration and compliance data from many accounts and Regions into one view. It is read-only: it does not deploy rules, push configuration, or turn on Config recording in the source accounts. You still need Config recording turned on in each account and Region (by your baseline, or by Control Tower or Security Hub), and you deploy rules or conformance packs separately (organisation rules need the multi-account setup principal). Using an aggregator has no extra cost of its own ⚠ VERIFY; you pay for Config recording and rules.

Limits and honest costs

  • Regional. GuardDuty, Security Hub and Config are enabled per Region. The administrator designation is per Region too for GuardDuty and Security Hub ⚠ VERIFY. Enabling every Region multiplies cost; enabling none of the unused Regions leaves them unwatched.
  • Cost model changes. Security Hub's pricing changed with the December 2025 unified service (lesson in Module 5). GuardDuty protection plans are priced separately. Use free trial periods where available for the lab ⚠ VERIFY current trial terms and pricing.
  • Findings volume. More enabled standards and protection plans means more findings. Without triage ownership they become noise.
  • Delegated admin limits. Some services allow one delegated administrator per organisation, so choose the account carefully. Changing it later is possible but requires care.
  • Existing accounts. Auto-enable settings apply to new accounts; enabling for existing ones can need a separate setting (ALL versus NEW) ⚠ VERIFY.

Microsoft / Azure comparison

You know (Microsoft/Azure)AWS equivalentWhat's different
Microsoft Defender for Cloud enabled at management group scopeGuardDuty and Security Hub organisation configuration with auto-enableAWS enables per service and per Region, with a delegated administrator, rather than one plan switch at the management group
Defender for Cloud "auto-provisioning"Auto-enable for new membersSame idea
Microsoft Sentinel workspace in a security subscriptionSecurity tooling account, with findings exported to a SIEM or Security LakeAWS has no single Sentinel-like service; you compose GuardDuty, Security Hub, Detective and a SIEM
Azure Lighthouse delegating management to a managing tenantDelegated administratorDelegated per service, not a blanket management right
Azure Policy compliance viewConfig aggregator and Security Hub standardsConfig shows resource configuration against rules; Security Hub scores against standards
PIM for admin rolesIAM Identity Center permission sets with MFA and session limitsSame intent, different tool

Architecture

The security-boundary view: who can change detection.

PrincipalSee findingsChange detection settingsDisable detection in a member
Workload engineerOwn account only (if granted)NoNo (SCP and org-managed membership)
SOC analyst (read-only permission set in tooling account)All accountsNoNo
Security engineer (admin permission set in tooling account)All accountsYes, through change controlYes, via the admin; audited
Management account administratorVia switchingCan change the delegationYes: so keep this group tiny
Break-glass roleYesYesOnly with approval

Step-by-step implementation

Choose the security tooling account and governed Regions

Use the security-tooling account in the Security OU. Decide the governed Regions: for Harbourline, eu-west-2 and eu-west-1, plus us-east-1 if global-service signals require it. Anything else is denied by the Region SCP (guardrails lesson).

Prepare the account

No workloads. Identity Center permission sets: SecurityAnalystReadOnly, SecurityEngineerAdmin, and a break-glass role. Turn on the account's own CloudTrail (it is covered by the organisation trail) and apply the baseline SCP.

Enable trusted access and designate the administrator

In the management account, enable trusted access for each service and designate the security tooling account. Do GuardDuty first, then Security Hub, then Config and Access Analyzer. Verify each with list-delegated-administrators.

Turn on the services in the administrator account

Enable GuardDuty in each governed Region of the administrator account, then set the organisation configuration so new and existing members are enabled automatically. Enable Security Hub there and choose standards (start with AWS Foundational Security Best Practices; add PCI DSS only for accounts in scope) ⚠ VERIFY standard names and availability.

Create the Config aggregator

In the administrator account, create an organisation aggregator over the governed Regions. Confirm the aggregator sees all accounts. Remember: this does not turn on Config recording.

Route findings to humans

EventBridge rules in the tooling account on high-severity findings go to the SOC channel or SIEM. Define severity to action in a table with owners and response times. Keep automation conservative: auto-remediation in production at a bank needs change control.

Protect the arrangement

Attach an SCP denying the disabling APIs (guardduty:DeleteDetector, guardduty:DisassociateFromAdministratorAccount, securityhub:DisableSecurityHub, config:StopConfigurationRecorder, and so on) with only the break-glass exemption. The lab's baseline policy does exactly this.

Check coverage on a schedule

Run the two checks below daily: delegated administrators are as expected, and GuardDuty has no gaps. Alert on exit code 1 and file the output as evidence.

AWS Console instructions

  1. Management account → AWS Organizations → Services. For each service, check whether trusted access is Enabled.
  2. Management account → GuardDuty → Settings → Delegated administrator (in the chosen Region): designate the security tooling account's ID. Repeat in each governed Region.
  3. Security tooling account → GuardDuty → Accounts. See organisation members and their status. Set Auto-enable to Enable for all accounts under Settings.
  4. Security tooling account → Security Hub (the Security Hub console for your Region): enable, review Settings → Configuration for central configuration, and choose standards.
  5. Security tooling account → AWS Config → Aggregators → Add aggregator. Choose Add my organization, select the Regions, and let the console create the service role.
  6. IAM Access Analyzer → Analyzers → Create analyzer with zone of trust Current organization (from the delegated administrator account) ⚠ VERIFY.

AWS CLI

# ---- In the MANAGEMENT account ----
# Who is a delegated administrator, for what?
aws organizations list-delegated-administrators --profile learn-management
aws organizations list-delegated-services-for-account --account-id <security-tooling-account-id> --profile learn-management

# Trusted access (some services do this for you when you designate the administrator)
aws organizations enable-aws-service-access --service-principal config-multiaccountsetup.amazonaws.com --profile learn-management
aws organizations enable-aws-service-access --service-principal config.amazonaws.com --profile learn-management

# GuardDuty: designate the administrator in a Region (repeat per governed Region)
aws guardduty enable-organization-admin-account --admin-account-id <security-tooling-account-id> \
  --region eu-west-2 --profile learn-management

# Security Hub: designate the administrator (repeat per governed Region)
aws securityhub enable-organization-admin-account --admin-account-id <security-tooling-account-id> \
  --region eu-west-2 --profile learn-management

# Config needs registrations for the aggregator and for organisation rules (⚠ VERIFY principals)
aws organizations register-delegated-administrator --account-id <security-tooling-account-id> \
  --service-principal config.amazonaws.com --profile learn-management
aws organizations register-delegated-administrator --account-id <security-tooling-account-id> \
  --service-principal config-multiaccountsetup.amazonaws.com --profile learn-management

# ---- In the SECURITY TOOLING account ----
# GuardDuty: create a detector and enable all current and future members
DETECTOR=$(aws guardduty create-detector --enable --region eu-west-2 --profile learn-security-tooling --query DetectorId --output text)
aws guardduty update-organization-configuration --detector-id "$DETECTOR" \
  --auto-enable-organization-members ALL --region eu-west-2 --profile learn-security-tooling

# GuardDuty: list members and their status
aws guardduty list-members --detector-id "$DETECTOR" --only-associated false \
  --region eu-west-2 --profile learn-security-tooling --query "Members[].{Account:AccountId,Status:RelationshipStatus}" --output table

# Security Hub: enable, then turn on auto-enable for new members
aws securityhub enable-security-hub --region eu-west-2 --profile learn-security-tooling
aws securityhub update-organization-configuration --auto-enable --region eu-west-2 --profile learn-security-tooling

# Config: create an organisation aggregator
aws configservice put-configuration-aggregator --configuration-aggregator-name hl-org-aggregator \
  --organization-aggregation-source "RoleArn=arn:aws:iam::<security-tooling-account-id>:role/hl-config-aggregator,AllAwsRegions=false,AwsRegions=eu-west-2,eu-west-1" \
  --region eu-west-2 --profile learn-security-tooling
aws configservice describe-configuration-aggregators --region eu-west-2 --profile learn-security-tooling

Parameter shapes for update-organization-configuration and the aggregator source change between CLI versions and with Security Hub's central configuration ⚠ VERIFY with aws securityhub update-organization-configuration help and aws configservice put-configuration-aggregator help.

Infrastructure as Code

This configuration passed terraform validate on 1.14 with AWS provider v6. It has not been applied from this course.

terraform {
  required_version = ">= 1.10"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 6.0"
    }
  }
}

variable "management_profile" {
  type    = string
  default = "learn-management"
}

variable "tooling_profile" {
  type    = string
  default = "learn-security-tooling"
}

variable "security_tooling_account_id" {
  type = string
}

variable "regions" {
  type    = list(string)
  default = ["eu-west-2", "eu-west-1"]
}

provider "aws" {
  alias   = "management"
  region  = "eu-west-2"
  profile = var.management_profile
}

provider "aws" {
  alias   = "tooling"
  region  = "eu-west-2"
  profile = var.tooling_profile
}

# ---- MANAGEMENT ACCOUNT: designate the delegated administrators ----------

resource "aws_guardduty_organization_admin_account" "this" {
  provider         = aws.management
  admin_account_id = var.security_tooling_account_id
}

resource "aws_securityhub_organization_admin_account" "this" {
  provider         = aws.management
  admin_account_id = var.security_tooling_account_id
}

# Config: one registration for the aggregator, one for organisation rules and conformance packs.
resource "aws_organizations_delegated_administrator" "config" {
  for_each = toset([
    "config.amazonaws.com",
    "config-multiaccountsetup.amazonaws.com"
  ])
  provider          = aws.management
  account_id        = var.security_tooling_account_id
  service_principal = each.value
}

# ---- SECURITY TOOLING ACCOUNT: configure the services for the organisation ----

resource "aws_guardduty_detector" "tooling" {
  provider = aws.tooling
  enable   = true
}

resource "aws_guardduty_organization_configuration" "this" {
  provider                         = aws.tooling
  detector_id                      = aws_guardduty_detector.tooling.id
  auto_enable_organization_members = "ALL"

  depends_on = [aws_guardduty_organization_admin_account.this]
}

resource "aws_securityhub_account" "tooling" {
  provider = aws.tooling
}

resource "aws_securityhub_organization_configuration" "this" {
  provider              = aws.tooling
  auto_enable           = true
  auto_enable_standards = "DEFAULT"

  depends_on = [aws_securityhub_organization_admin_account.this, aws_securityhub_account.tooling]
}

# A read-only organisation-wide view of configuration and compliance, in the security tooling account.
data "aws_iam_policy_document" "config_trust" {
  provider = aws.tooling
  statement {
    actions = ["sts:AssumeRole"]
    principals {
      type        = "Service"
      identifiers = ["config.amazonaws.com"]
    }
  }
}

resource "aws_iam_role" "config_aggregator" {
  provider           = aws.tooling
  name               = "hl-config-aggregator"
  assume_role_policy = data.aws_iam_policy_document.config_trust.json
}

resource "aws_iam_role_policy_attachment" "config_aggregator" {
  provider   = aws.tooling
  role       = aws_iam_role.config_aggregator.name
  policy_arn = "arn:aws:iam::aws:policy/service-role/AWSConfigRoleForOrganizations"
}

resource "aws_config_configuration_aggregator" "org" {
  provider = aws.tooling
  name     = "hl-org-aggregator"

  organization_aggregation_source {
    all_regions = false
    regions     = var.regions
    role_arn    = aws_iam_role.config_aggregator.arn
  }

  depends_on = [aws_iam_role_policy_attachment.config_aggregator, aws_organizations_delegated_administrator.config]
}

auto_enable_standards = "DEFAULT" enables the default standards for new members. Check which standards that means today ⚠ VERIFY, because Security Hub's central configuration may supersede these settings in new organisations.

Complete code

Two checks, both compiled on .NET 10 against SDK v4 packages. Run them daily from a pipeline and alert on a non-zero exit code.

1. Delegated administrators. Does each security service have the one expected administrator, and is the management account absent from the list? Run in the management account (package AWSSDK.Organizations).

DelegatedAdmins/Program.cs
using Amazon.Organizations;
using Amazon.Organizations.Model;

// Who administers each security service for the organisation? The management account itself should not.
// Run in the MANAGEMENT account.
var org = new AmazonOrganizationsClient();

// Expected: service principal -> the account NAME that should be its administrator. (Names are fictional.)
var expected = new Dictionary<string, string>
{
    ["guardduty.amazonaws.com"] = "security-tooling",
    ["securityhub.amazonaws.com"] = "security-tooling",
    ["config-multiaccountsetup.amazonaws.com"] = "security-tooling",
    ["access-analyzer.amazonaws.com"] = "security-tooling",
    ["cloudtrail.amazonaws.com"] = "security-tooling",
};

var self = (await org.DescribeOrganizationAsync(new DescribeOrganizationRequest())).Organization!;
var accounts = new List<Account>();
string? token = null;
do
{
    var page = await org.ListAccountsAsync(new ListAccountsRequest { NextToken = token });
    accounts.AddRange(page.Accounts ?? []);
    token = page.NextToken;
} while (token is not null);

var nameById = accounts.ToDictionary(a => a.Id, a => a.Name);

var actual = new Dictionary<string, List<string>>();
foreach (var admin in (await org.ListDelegatedAdministratorsAsync(new ListDelegatedAdministratorsRequest())).DelegatedAdministrators ?? [])
{
    var services = await org.ListDelegatedServicesForAccountAsync(new ListDelegatedServicesForAccountRequest { AccountId = admin.Id });
    foreach (var s in services.DelegatedServices ?? [])
    {
        if (!actual.TryGetValue(s.ServicePrincipal, out var list)) actual[s.ServicePrincipal] = list = [];
        list.Add(nameById.GetValueOrDefault(admin.Id, admin.Id));
    }
}

var failures = 0;
foreach (var (principal, wanted) in expected)
{
    var got = actual.GetValueOrDefault(principal) ?? [];
    var ok = got.Count == 1 && got[0] == wanted;
    if (!ok) failures++;
    Console.WriteLine($"{(ok ? "OK  " : "FAIL")} {principal,-42} wanted {wanted}, found [{string.Join(", ", got)}]");
}

Console.WriteLine($"Management account is {self.MasterAccountId}; it should never appear above.");
return failures == 0 ? 0 : 1;

2. GuardDuty coverage. Is GuardDuty enabled in each governed Region, and is every member account enabled? Run in the security tooling account (package AWSSDK.GuardDuty).

GuardDutyCoverage/Program.cs
using Amazon;
using Amazon.GuardDuty;
using Amazon.GuardDuty.Model;

// GuardDuty coverage per Region, from the GuardDuty ADMINISTRATOR (security tooling) account.
//   AWS_PROFILE=learn-security-tooling dotnet run -- eu-west-2 eu-west-1
// Exit code 0 = every Region has an enabled detector and every member is enabled; 1 = gaps.
var regions = args.Length > 0 ? args : ["eu-west-2", "eu-west-1"];
var gaps = 0;

foreach (var region in regions)
{
    using var gd = new AmazonGuardDutyClient(RegionEndpoint.GetBySystemName(region));

    var detectorIds = (await gd.ListDetectorsAsync(new ListDetectorsRequest())).DetectorIds ?? [];
    if (detectorIds.Count == 0)
    {
        Console.WriteLine($"{region,-12} GAP  no detector: GuardDuty is not enabled in this Region.");
        gaps++;
        continue;
    }

    var detectorId = detectorIds[0];
    var detector = await gd.GetDetectorAsync(new GetDetectorRequest { DetectorId = detectorId });
    if (detector.Status != DetectorStatus.ENABLED)
    {
        Console.WriteLine($"{region,-12} GAP  detector {detectorId} is {detector.Status?.Value}.");
        gaps++;
    }

    var members = new List<Member>();
    string? token = null;
    do
    {
        var page = await gd.ListMembersAsync(new ListMembersRequest
        {
            DetectorId = detectorId,
            OnlyAssociated = "false",
            NextToken = token
        });
        members.AddRange(page.Members ?? []);
        token = page.NextToken;
    } while (token is not null);

    foreach (var group in members.GroupBy(m => m.RelationshipStatus).OrderBy(g => g.Key))
        Console.WriteLine($"{region,-12} members {group.Key,-18} {group.Count()}");

    var notEnabled = members.Where(m => m.RelationshipStatus != "Enabled").ToList();
    foreach (var m in notEnabled)
        Console.WriteLine($"{region,-12} GAP  account {m.AccountId} is {m.RelationshipStatus}");
    gaps += notEnabled.Count;
}

Console.WriteLine(gaps == 0 ? "OK: GuardDuty coverage is complete." : $"{gaps} gap(s).");
return gaps == 0 ? 0 : 1;

Code explained line by line

Delegated administrators

  1. expected is a policy as data: for each service principal, the one account name that should administer it. Changing the design means changing this table in a pull request.
  2. ListAccounts (paged) builds an ID-to-name map so the output speaks in names rather than 12-digit IDs.
  3. ListDelegatedAdministrators returns accounts that are delegated administrators for something; ListDelegatedServicesForAccount returns which services, per account. The loop builds a map from service principal to the account names that administer it.
  4. actual.TryGetValue(... out var list)) actual[...] = list = [] creates the list on first use; collection expressions ([]) make it concise.
  5. A service passes only if exactly one account administers it and it is the expected one. Two administrators or none both fail, which catches half-finished migrations.
  6. The final line reminds you what to look for by eye: the management account ID must not appear as an administrator.

GuardDuty coverage

  1. A GuardDuty client is Regional, so the program creates one per Region from the command-line arguments, defaulting to Harbourline's governed Regions.
  2. No detector in a Region means GuardDuty is not enabled there: that is a gap, and the program moves to the next Region.
  3. GetDetector returns the detector's status. A detector can exist but be disabled.
  4. ListMembers with OnlyAssociated = "false" returns members in every relationship state. In SDK v4 the parameter is a string, not a bool.
  5. Grouping by RelationshipStatus prints a summary. Anything other than Enabled is reported as a gap per account, because "invited but not accepted" or "removed" means no detection.
  6. The exit code is non-zero if any gap exists.

Security considerations

⚠ Learning shortcut — not for production

In the lab you may designate your sandbox account as the administrator and sign in with one SSO user who can do everything. A bank splits the roles: analysts read, engineers change through change control, and nobody can both alter detection settings and approve their own alert suppression. A real security tooling account also has its own backup, retention for findings, and break-glass monitoring that the lab skips.

  • The delegated administrator is a high-value target. It can enable or disable security services across the organisation. Hardware MFA, session limits, few humans, alerts on every change.
  • Suppression rules are exceptions to detection. Treat each suppression like a risk acceptance: owner, reason, expiry date, review.
  • Do not auto-remediate blindly. Quarantining a payments instance automatically can cause the outage you fear. Start with notifications and human approval; automate only well-understood, reversible actions.
  • Findings are sensitive. They reveal your weaknesses and may contain personal data. Control access and retention (Centralised logging).
  • Detection is not prevention. GuardDuty tells you after something odd happened. Preventive controls (SCPs, least privilege, network design) remain essential.
  • Do not claim compliance. "Security Hub shows 95 percent for a standard" is a posture score for selected controls, not evidence that you meet a framework. Your compliance team and, for PCI DSS, your assessor decide what evidence is accepted.

Banking use case

When Harbourline creates a new account through its vending pipeline, nobody asks the security team to "turn things on". Within minutes the account appears as a GuardDuty member (auto-enable), shows in Security Hub with the default standards, and is visible in the Config aggregator once its recorder starts. The security team's morning routine runs the two checks from a scheduled pipeline; a red result opens a ticket automatically.

Six months in, a high-severity GuardDuty finding appears: credentials from a payments-dev role used from an unusual network. The analyst, signed in to the tooling account with the read-only permission set, opens the finding, pivots to the organisation trail logs in the log archive (via Athena), sees the role's activity, and pages the platform team to revoke sessions. At no point did anyone sign in to the management account or to payments-dev.

Common mistakes

  • Using the management account as the GuardDuty or Security Hub administrator. It works, but concentrates power where it should be minimal.
  • Enabling in one Region only. Attackers use the Regions you do not watch.
  • Forgetting existing accounts. auto-enable NEW leaves old accounts uncovered; choose ALL or enrol them.
  • Assuming the aggregator turns Config on. It only aggregates what recorders already record.
  • Turning on every protection plan. Cost and noise rise together. Enable by data and workload risk.
  • No owner for findings. A finding with no owner is a log line.
  • Not protecting the setup with an SCP. Engineers can then disassociate their account.
  • Delegating to an account that also runs workloads. Keep it dedicated.

Troubleshooting

SymptomLikely causeFix
AccessDeniedException designating the administratorNot the management account, or trusted access not enabledUse the management account; enable trusted access for the service
BadRequestException: ... already has an administratorA different delegated administrator is registered in that RegionRemove it first (disable-organization-admin-account) or keep it
Members show Invited not EnabledAuto-enable not set to ALL, or the account joined before the settingSet ALL, or enable members explicitly
Config aggregator shows no dataConfig recorders are off in the source accounts, or the aggregator Regions do not matchEnable recording; check aggregator sources
AccessDenied creating the aggregatorDelegated administrator for config.amazonaws.com not registeredRegister it from the management account ⚠ VERIFY
Coverage program says "no detector"Wrong Region for the profile, or GuardDuty never enabled therePass the Region as an argument; enable the detector
Security Hub cost jumpedStandards and unified plan resource unitsReview enabled standards; check pricing page ⚠ VERIFY

Cost and cleanup

Cost label: credits. Use the free trial periods for GuardDuty and Security Hub in the sandbox, one Region only, for an hour or two, then disable ⚠ VERIFY current trial terms, because Security Hub's pricing changed recently. Config recording and rules are charged per item and evaluation ⚠ VERIFY. Do not leave any of it running: a forgotten detector in a busy account costs more than the lab is worth.

If you designate your sandbox as the administrator, the minimum sequence is:

# 1. In the administrator (sandbox) account: stop auto-enable and remove members, then disable the services
aws guardduty update-organization-configuration --detector-id "$DETECTOR" --auto-enable-organization-members NONE --region eu-west-2 --profile learn-sandbox
aws guardduty delete-detector --detector-id "$DETECTOR" --region eu-west-2 --profile learn-sandbox
aws securityhub disable-security-hub --region eu-west-2 --profile learn-sandbox
aws configservice delete-configuration-aggregator --configuration-aggregator-name hl-org-aggregator --region eu-west-2 --profile learn-sandbox

# 2. In the management account: remove the delegations
aws guardduty disable-organization-admin-account --admin-account-id <sandbox-account-id> --region eu-west-2 --profile learn-management
aws securityhub disable-organization-admin-account --admin-account-id <sandbox-account-id> --region eu-west-2 --profile learn-management
aws organizations deregister-delegated-administrator --account-id <sandbox-account-id> --service-principal config.amazonaws.com --profile learn-management
aws organizations deregister-delegated-administrator --account-id <sandbox-account-id> --service-principal config-multiaccountsetup.amazonaws.com --profile learn-management

# 3. Confirm nothing remains
aws organizations list-delegated-administrators --profile learn-management
aws guardduty list-detectors --region eu-west-2 --profile learn-sandbox
aws resourcegroupstaggingapi get-resources --tag-filters Key=Project,Values=cea-lab --region eu-west-2 --profile learn-sandbox

Order matters: delete the detector before removing the delegation if GuardDuty refuses to deregister while members are associated. Terraform users run terraform destroy, which handles most of this order via dependencies.

Exercises

  • 🟢 Guided: Run aws organizations list-delegated-administrators and list-delegated-services-for-account in your organisation. Compare with the expected table. Then run the delegated-administrator check (build the console project) and read the output.
  • 🟡 Challenge: Write the severity routing table for Harbourline: for each GuardDuty severity band, who is notified, how fast they must respond, and what automation (if any) is allowed. Add one example finding type per band.
  • 🔴 Live problem: "The GuardDuty coverage report shows four accounts in status Removed in eu-west-1, and the engineering lead says they asked for them to be removed because of cost." Write your response: what you check first, what you decide, and how you stop it happening silently again.

Assignment

Add docs/security-tooling-design.md to your portfolio repository: the delegation table (service principal, administrator account, Regions), auto-enable settings with the reason, the standards chosen, the severity routing table, the SCP that protects it, the cost estimate with ⚠ VERIFY prices, and the output of both checks (IDs redacted).

Solutions

Knowledge check

Interview questions

  • How do you make sure every new AWS account has threat detection from day one? Delegate GuardDuty to a security tooling account, set organisation auto-enable to ALL, protect the setting with an SCP, and run a daily coverage check.
  • Why separate the security tooling account from the log archive account? Different duties: the log archive is write-once evidence storage with minimal read access; the tooling account runs services and analysts' queries. Combining them gives analysts or tooling roles power over evidence.
  • What are the limits of a Config aggregator? It is read-only, depends on recorders being on, and does not deploy rules.
  • How do you stop security tooling becoming noise? Owners and severity routing, suppression rules with expiry, selective protection plans, and regular tuning reviews.

Certification practice

Completion checklist

  • I can explain trusted access and delegated administrators in two sentences
  • I can list which services support organisation mode and the principal for each (with ⚠ VERIFY noted)
  • I built and read the output of both C# checks
  • I can explain what a Config aggregator does and does not do
  • I wrote the severity routing table
  • I ran the cleanup and confirmed no detectors or aggregators remain

Key takeaways

  • Delegate security services to a dedicated tooling account and keep the management account nearly empty.
  • Auto-enable ALL, per governed Region, and protect it with an SCP.
  • An aggregator is a read-only view; recorders and rules are separate.
  • Cost and noise grow with enabled plans and standards: choose deliberately and give findings owners.
  • Check coverage daily; a design nobody verifies is a hope.

Further reading

Independent learning resource — not affiliated with, endorsed or sponsored by Amazon Web Services. AWS and related marks are trademarks of Amazon.com, Inc. or its affiliates. All banking data in examples is fictional. Sample architectures are for learning and are not automatically compliant with GDPR, PCI DSS or any banking regulation.

On this page