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.
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
- Security Hub, GuardDuty, Inspector and Detective: what each service detects and how findings look. This lesson is about organisation-wide enablement and administration, not the detections themselves.
- AWS Config and conformance packs
- AWS Organizations structure and Centralised logging
- Tools: AWS CLI v2 with
learn-managementandlearn-sandbox(or a security tooling account profile); optional Terraform 1.10+ or CDK; .NET 10 SDK.
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:
- 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.
- 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
| Service | Service principal ⚠ VERIFY | What the delegated admin can do |
|---|---|---|
| Amazon GuardDuty | guardduty.amazonaws.com | Enable GuardDuty in members, auto-enable new accounts, configure protection plans, view all findings |
| AWS Security Hub (CSPM and unified) | securityhub.amazonaws.com | Enable in members, manage central configuration policies, standards and finding aggregation |
| AWS Config | config.amazonaws.com, config-multiaccountsetup.amazonaws.com | Create an organisation aggregator; deploy organisation rules and conformance packs |
| IAM Access Analyzer | access-analyzer.amazonaws.com | Create an organisation-wide analyzer (zone of trust is the organisation) |
| Amazon Macie | macie.amazonaws.com | Enable and manage sensitive-data discovery across members |
| Amazon Inspector | inspector2.amazonaws.com | Enable scanning in members and view findings |
| AWS CloudTrail | cloudtrail.amazonaws.com | Create and manage organisation trails (see Centralised logging) |
| Amazon Detective | detective.amazonaws.com | Manage 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
| Problem | Solution |
|---|---|
| New accounts launch with no detection | Auto-enable in the organisation configuration |
| Engineers could disable detection in their own account | Organisation-managed members cannot suspend it, plus an SCP denying the disabling APIs |
| Findings scattered over 80 consoles | One administrator account sees all findings |
| Standards compliance state per account | Security Hub central configuration and aggregated view |
| "What is configured where?" across accounts | An 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 (
ALLversusNEW) ⚠ VERIFY.
Microsoft / Azure comparison
| You know (Microsoft/Azure) | AWS equivalent | What's different |
|---|---|---|
| Microsoft Defender for Cloud enabled at management group scope | GuardDuty and Security Hub organisation configuration with auto-enable | AWS 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 members | Same idea |
| Microsoft Sentinel workspace in a security subscription | Security tooling account, with findings exported to a SIEM or Security Lake | AWS has no single Sentinel-like service; you compose GuardDuty, Security Hub, Detective and a SIEM |
| Azure Lighthouse delegating management to a managing tenant | Delegated administrator | Delegated per service, not a blanket management right |
| Azure Policy compliance view | Config aggregator and Security Hub standards | Config shows resource configuration against rules; Security Hub scores against standards |
| PIM for admin roles | IAM Identity Center permission sets with MFA and session limits | Same intent, different tool |
Architecture
The security-boundary view: who can change detection.
| Principal | See findings | Change detection settings | Disable detection in a member |
|---|---|---|---|
| Workload engineer | Own account only (if granted) | No | No (SCP and org-managed membership) |
| SOC analyst (read-only permission set in tooling account) | All accounts | No | No |
| Security engineer (admin permission set in tooling account) | All accounts | Yes, through change control | Yes, via the admin; audited |
| Management account administrator | Via switching | Can change the delegation | Yes: so keep this group tiny |
| Break-glass role | Yes | Yes | Only 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
- Management account → AWS Organizations → Services. For each service, check whether trusted access is Enabled.
- Management account → GuardDuty → Settings → Delegated administrator (in the chosen Region): designate the security tooling account's ID. Repeat in each governed Region.
- Security tooling account → GuardDuty → Accounts. See organisation members and their status. Set Auto-enable to Enable for all accounts under Settings.
- Security tooling account → Security Hub (the Security Hub console for your Region): enable, review Settings → Configuration for central configuration, and choose standards.
- Security tooling account → AWS Config → Aggregators → Add aggregator. Choose Add my organization, select the Regions, and let the console create the service role.
- 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-toolingParameter 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).
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).
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
expectedis 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.ListAccounts(paged) builds an ID-to-name map so the output speaks in names rather than 12-digit IDs.ListDelegatedAdministratorsreturns accounts that are delegated administrators for something;ListDelegatedServicesForAccountreturns which services, per account. The loop builds a map from service principal to the account names that administer it.actual.TryGetValue(... out var list)) actual[...] = list = []creates the list on first use; collection expressions ([]) make it concise.- 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.
- The final line reminds you what to look for by eye: the management account ID must not appear as an administrator.
GuardDuty coverage
- A
GuardDutyclient is Regional, so the program creates one per Region from the command-line arguments, defaulting to Harbourline's governed Regions. - No detector in a Region means GuardDuty is not enabled there: that is a gap, and the program moves to the next Region.
GetDetectorreturns the detector's status. A detector can exist but be disabled.ListMemberswithOnlyAssociated = "false"returns members in every relationship state. In SDK v4 the parameter is a string, not a bool.- Grouping by
RelationshipStatusprints a summary. Anything other thanEnabledis reported as a gap per account, because "invited but not accepted" or "removed" means no detection. - 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 NEWleaves old accounts uncovered; chooseALLor 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
| Symptom | Likely cause | Fix |
|---|---|---|
AccessDeniedException designating the administrator | Not the management account, or trusted access not enabled | Use the management account; enable trusted access for the service |
BadRequestException: ... already has an administrator | A different delegated administrator is registered in that Region | Remove it first (disable-organization-admin-account) or keep it |
Members show Invited not Enabled | Auto-enable not set to ALL, or the account joined before the setting | Set ALL, or enable members explicitly |
| Config aggregator shows no data | Config recorders are off in the source accounts, or the aggregator Regions do not match | Enable recording; check aggregator sources |
AccessDenied creating the aggregator | Delegated administrator for config.amazonaws.com not registered | Register it from the management account ⚠ VERIFY |
| Coverage program says "no detector" | Wrong Region for the profile, or GuardDuty never enabled there | Pass the Region as an argument; enable the detector |
| Security Hub cost jumped | Standards and unified plan resource units | Review 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-sandboxOrder 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-administratorsandlist-delegated-services-for-accountin 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
Removedineu-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
In a new sandbox organisation you probably have no delegated administrators yet, so list-delegated-administrators returns an empty list and the C# check reports FAIL for every service with "found []". That is the correct, honest result. After you designate the tooling account for GuardDuty, rerun it: the GuardDuty line should flip to OK while the others stay FAIL until you delegate them. The check is a to-do list.
Example: Critical (9.0 to 10.0): page the SOC on-call immediately, response in 15 minutes, no auto-remediation in production, allowed auto-isolation only in non-production. High (7.0 to 8.9): ticket and chat alert, response in 4 hours, enrichment automation only (add context from the log archive). Medium (4.0 to 6.9): daily review queue, response in 3 working days, suppress known-benign patterns with an expiry. Low (1.0 to 3.9): weekly review and trend reporting, no alert. Findings in Recon:EC2/PortProbeUnprotectedPort style (Low or Medium) belong in the review queue; UnauthorizedAccess:IAMUser/InstanceCredentialExfiltration style findings (High) page someone. Finding type names are illustrative: check the current GuardDuty finding types list ⚠ VERIFY.
First, find out who removed them and how: CloudTrail in the tooling account for DisassociateMembers or DeleteMembers, and in the member accounts for DisassociateFromAdministratorAccount (which the baseline SCP should have denied, so also check whether the SCP is attached to that OU). Second, a cost concern is legitimate but must go through governance: GuardDuty cost per account can be reduced by trimming protection plans, not by removing coverage. Re-enable the four accounts (auto-enable ALL, or invite them again), show the cost data to the engineering lead, and agree an exception process: removal requires risk acceptance signed by the owner and the security lead, with an expiry. Stop recurrence by attaching the SCP, alerting on the disassociate events, and having the daily coverage check fail loudly.
Knowledge check
Answer: A member account that the management account registers to administer a specific AWS service across the organisation, so day-to-day administration does not happen in the management account.
Answer: No. An aggregator is a read-only collection of data from sources that already record. Recording must be enabled separately in each account and Region.
Answer: NEW covers only accounts created or added after the setting. ALL also covers existing members, so there is no uncovered legacy account.
Answer: It is the most powerful account and should have minimal access; SCPs do not restrict it; mixing security administration with organisation administration breaks segregation of duties.
Answer: An SCP denying guardduty:DisassociateFromAdministratorAccount (and related actions) for everyone except a break-glass role, plus organisation-managed membership.
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
A company wants GuardDuty enabled automatically for all existing and future accounts in an organisation, managed by the security team without using the management account day to day. What should they do?
A) Enable GuardDuty manually in each account. B) Designate a security account as the GuardDuty delegated administrator and enable auto-enable for all organisation members. C) Create a GuardDuty detector in the management account only. D) Use CloudFormation StackSets to deploy an identical detector with no organisation integration.
Answer: B. Delegated administration plus auto-enable covers existing and new accounts and keeps administration out of the management account. A and D are manual or lack central member management. C covers one account only.
A security team needs a single view of resource configuration and compliance across 60 accounts and two Regions, without deploying any resources into the accounts. Config is already recording in each account. Which feature meets this?
A) A Config conformance pack in each account. B) An AWS Config organisation aggregator in a delegated administrator account. C) Amazon Inspector. D) CloudTrail Insights.
Answer: B. An aggregator collects configuration and compliance data from multiple accounts and Regions into one read-only view. A deploys rules into each account. C scans for vulnerabilities, and D detects unusual API activity.
Several accounts appear as members of GuardDuty with a relationship status other than Enabled. Which action restores coverage with the least effort for future accounts too?
A) Ask each account owner to enable GuardDuty. B) Set the organisation configuration to auto-enable for all members and re-enrol the affected accounts. C) Delete the GuardDuty administrator. D) Disable GuardDuty everywhere and re-enable later.
Answer: B. Auto-enable for all members handles both current and future accounts. A is manual and error-prone. C and D remove coverage.
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
- AWS Config: multi-account multi-Region data aggregation
- Creating a trail for an organization (trusted access and delegated administrators in practice)
- AWS Security Reference Architecture
- Security Hub, GuardDuty, Inspector and Detective
- Next: the module lab ties guardrails and structure together.
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.
Centralised logging: an organisation trail, a log archive account and retention you can defend
Design where every account's audit logs go, who can write, read and delete them, how long they are kept and what that costs, then build an organisation trail into an encrypted, Object Lock protected log archive bucket and verify it with a tested check.
Tagging strategy and tag policies: ownership, cost allocation and enforcement
Design a small mandatory tag set for Harbourline, standardise it with Organizations tag policies, enforce it at creation time with SCPs, Config rules and CDK, activate it for cost allocation, and audit coverage with a C# tool.