MOOBON
Technical Article ・ AWS / Security

Controlling GuardDuty and Inspector from a Dedicated Security AccountAggregating all regions with Organizations and Security Hub, with Slack and email alerts

Published October 16, 202610 min readMOOBON Tech Blog

This article adds a dedicated security account to AWS Organizations and makes it the delegated administrator for GuardDuty, Inspector and Security Hub. Findings from every account and region in the organization are aggregated in Security Hub (Tokyo region), and GuardDuty findings of MEDIUM severity or higher are sent to email and Slack.

1. Architecture

ServiceRoleExample findings
GuardDutyThreat detectionAPI calls from unusual countries, crypto mining on EC2, use of leaked credentials
InspectorVulnerability detectionKnown vulnerabilities (CVEs) in packages on EC2, ECR container images and Lambda
Security Hub CSPMFinding aggregation and configuration checksFindings from the two services above, plus resource configuration checks against FSBP and CIS
[ Management account ]
   │  designates the delegated administrator (section 4)
   ▼
[ Security account ]  delegated admin for GuardDuty / Inspector / Security Hub
   ▲
   │  findings (every account in the org × every region)
   │
   ├── Management account
   └── Workload accounts

Security Hub (all regions aggregated into Tokyo)
   → EventBridge rule (GuardDuty, MEDIUM and above)
   → SNS → email / Slack (Amazon Q Developer in chat applications)

A delegated administrator is an account that manages a service for the whole organization in place of the management account. From the delegated administrator, you can enable the service in member accounts and review all their findings in one place.

Security Hub was revamped in December 2025, and the original Security Hub was renamed Security Hub CSPM. The commands and alert rule in this article use the Security Hub CSPM API (aws securityhub) and its finding format (ASFF). The new Security Hub works on findings from CSPM, GuardDuty and Inspector, so it can be added to this setup later. The delegated administrator is shared by both.

Account IDs, email addresses and organization IDs are shown as placeholders such as <SECURITY_ACCOUNT_ID>.

2. Benefits of a dedicated security account

  • Fewer logins to the management account. The management account handles billing and SCPs and has the strongest permissions in the organization. AWS also recommends designating an account other than the management account as the delegated administrator for security services.
  • Findings are kept apart from workloads. If a workload account is compromised, the findings and alert settings remain in the security account.
  • Easier to separate permissions. You can give someone access to findings without access to production just by granting access to the security account.
  • One place to check. All findings can be reviewed on one Security Hub screen without switching accounts or regions.

AWS's multi-account guidance (the AWS Security Reference Architecture) also places a security account (Security Tooling) under a Security OU.

3. Create the security account

Sections 3 and 4 are run in the management account.

aws organizations create-account \
  --email aws-security@example.com \
  --account-name example-security

# done when State is SUCCEEDED
aws organizations list-create-account-status --states SUCCEEDED IN_PROGRESS

# create a Security OU and move the account into it
aws organizations create-organizational-unit \
  --parent-id <ROOT_ID> --name Security

aws organizations move-account \
  --account-id <SECURITY_ACCOUNT_ID> \
  --source-parent-id <ROOT_ID> \
  --destination-parent-id <SECURITY_OU_ID>
  • The email address becomes the root user. Use a shared group address, not a personal one.
  • Placing it in a separate OU from workloads lets you apply different SCPs.
  • Sign in with an IAM Identity Center (SSO) permission set, and set MFA on the root user. For the SSO setup, see our article on AWS SSO + AssumeRole.
# ~/.aws/config
[profile example-security]
sso_session = example-sso
sso_account_id = <SECURITY_ACCOUNT_ID>
sso_role_name = AdministratorAccess
region = ap-northeast-1

4. Designate the delegated administrator

In the management account, designate the security account as the delegated administrator for the three services. GuardDuty and Inspector must be designated in each region.

SEC=<SECURITY_ACCOUNT_ID>

# Security Hub (run in the aggregation region, ap-northeast-1)
aws securityhub enable-organization-admin-account \
  --admin-account-id $SEC --region ap-northeast-1

# GuardDuty and Inspector (every region)
for r in $(aws ec2 describe-regions --query 'Regions[].RegionName' --output text); do
  aws guardduty enable-organization-admin-account \
    --admin-account-id $SEC --region $r
  aws inspector2 enable-delegated-admin-account \
    --delegated-admin-account-id $SEC --region $r
done

Use the same account as the delegated administrator for GuardDuty and Security Hub. With different accounts, findings may not aggregate correctly.

5. Enable GuardDuty

From section 5 on, commands run in the security account. GuardDuty in the security account itself is enabled when it is designated as the delegated administrator. Add the organization's accounts as members.

# run in each region
DET=$(aws guardduty list-detectors --query 'DetectorIds[0]' --output text \
        --profile example-security)

# accounts in the organization can be added without an invitation email
aws guardduty create-members \
  --detector-id $DET \
  --account-details AccountId=<ACCOUNT_ID_1> AccountId=<ACCOUNT_ID_2> \
  --profile example-security

# done when RelationshipStatus is Enabled
aws guardduty list-members --detector-id $DET --profile example-security \
  --query 'Members[].[AccountId,RelationshipStatus]' --output table

To cover new accounts automatically, configure auto-enable. ALL covers both existing and new accounts; NEW covers new accounts only.

aws guardduty update-organization-configuration \
  --detector-id $DET \
  --auto-enable-organization-members ALL \
  --profile example-security

6. Enable Inspector

Inspector's auto-enable applies only to accounts added to the organization after it is set. Existing accounts must be enabled separately.

# automatically enable accounts added later
aws inspector2 update-organization-configuration \
  --auto-enable ec2=true,ecr=true,lambda=true \
  --profile example-security

# make existing accounts members and enable scanning
for acct in <ACCOUNT_ID_1> <ACCOUNT_ID_2>; do
  aws inspector2 associate-member --account-id $acct --profile example-security
done
aws inspector2 enable \
  --account-ids <ACCOUNT_ID_1> <ACCOUNT_ID_2> \
  --resource-types EC2 ECR LAMBDA \
  --profile example-security

In the console, "Activate all accounts" on Inspector's account management page does the same.

Right after enabling, Inspector also scans OS packages on EC2 and old images left in ECR, so the number of findings is high. Delete old images with an ECR lifecycle policy and start with resources that are actually running.

7. Aggregate in Security Hub

In accounts with Security Hub enabled, GuardDuty and Inspector findings are sent to Security Hub automatically. Configure cross-region aggregation and add members.

Aggregate all regions into Tokyo

aws securityhub create-finding-aggregator \
  --region-linking-mode ALL_REGIONS \
  --region ap-northeast-1 --profile example-security

Tokyo becomes the aggregation region, and findings from other regions can be reviewed there. The alert rule in section 8 depends on this aggregation.

Add the organization's accounts as members

aws securityhub create-members \
  --account-details '[{"AccountId":"<ACCOUNT_ID_1>"},{"AccountId":"<ACCOUNT_ID_2>"}]' \
  --profile example-security

aws securityhub list-members --only-associated --profile example-security \
  --query 'Members[].[AccountId,MemberStatus]' --output table

For configuration checks, we use AWS Foundational Security Best Practices (FSBP) and the CIS AWS Foundations Benchmark. With many accounts, central configuration lets you associate the standards as a policy with the organization root or an OU, so new accounts get the same settings.

8. Set up alerts

Alerts cover GuardDuty findings of MEDIUM severity or higher that have not been handled (workflow status NEW). Inspector findings and configuration checks are numerous, so they are handled in the Security Hub console without alerts.

A rule that matches GuardDuty events directly (source: aws.guardduty) only catches findings in the region where the rule exists. With a rule only in Tokyo, findings in other regions are not alerted on. If Security Hub aggregates all regions into Tokyo, using Security Hub events as the source lets one rule in Tokyo catch every region.

Create SNS topics

# run in the aggregation region (ap-northeast-1)
aws sns create-topic --name guardduty-findings-email --profile example-security
aws sns create-topic --name guardduty-findings --profile example-security

aws sns subscribe \
  --topic-arn arn:aws:sns:ap-northeast-1:<SECURITY_ACCOUNT_ID>:guardduty-findings-email \
  --protocol email --notification-endpoint aws-security@example.com \
  --profile example-security

Email and Slack use separate topics. The email topic receives a message formatted by EventBridge; the Slack topic receives the original event. Connect the Slack topic to a Slack channel with Amazon Q Developer in chat applications (formerly AWS Chatbot), which formats Security Hub events for posting.

In each topic's access policy, allow sns:Publish from events.amazonaws.com. If you restrict it to a rule with aws:SourceArn, specify the ARN of the rule created below.

Create the EventBridge rule

// pattern.json
{
  "source": ["aws.securityhub"],
  "detail-type": ["Security Hub Findings - Imported"],
  "detail": {
    "findings": {
      "ProductName": ["GuardDuty"],
      "Severity": { "Label": ["MEDIUM", "HIGH", "CRITICAL"] },
      "Workflow": { "Status": ["NEW"] },
      "RecordState": ["ACTIVE"]
    }
  }
}
aws events put-rule \
  --name securityhub-guardduty-medium-plus \
  --event-pattern file://pattern.json \
  --profile example-security

aws events put-targets \
  --rule securityhub-guardduty-medium-plus \
  --targets file://targets.json \
  --profile example-security

Format the email body

Set an input transformer on the email target. The Security Hub finding is in detail.findings[0].

// targets.json
[
  {
    "Id": "email",
    "Arn": "arn:aws:sns:ap-northeast-1:<SECURITY_ACCOUNT_ID>:guardduty-findings-email",
    "InputTransformer": {
      "InputPathsMap": {
        "acct":   "$.detail.findings[0].AwsAccountId",
        "region": "$.detail.findings[0].Region",
        "sev":    "$.detail.findings[0].Severity.Product",
        "label":  "$.detail.findings[0].Severity.Label",
        "type":   "$.detail.findings[0].Types[0]",
        "title":  "$.detail.findings[0].Title",
        "desc":   "$.detail.findings[0].Description",
        "first":  "$.detail.findings[0].FirstObservedAt",
        "last":   "$.detail.findings[0].LastObservedAt",
        "id":     "$.detail.findings[0].Id"
      },
      "InputTemplate": "\"[GuardDuty] Severity <sev> (<label>)\"\n\"Account: <acct> Region: <region>\"\n\"Type: <type>\"\n\"Summary: <title>\"\n\"Details: <desc>\"\n\"Finding ID: <id>\""
    }
  },
  {
    "Id": "slack",
    "Arn": "arn:aws:sns:ap-northeast-1:<SECURITY_ACCOUNT_ID>:guardduty-findings"
  }
]

If you include the IAM Identity Center access portal URL in the body, appending #/console?account_id=…&role_name=…&destination=… opens the specified console page after SSO sign-in.

9. Verify

Create a GuardDuty sample finding in a region other than Tokyo and check that the alert arrives.

DET=$(aws guardduty list-detectors --region us-west-2 \
        --query 'DetectorIds[0]' --output text --profile example-security)

# create one MEDIUM sample finding
aws guardduty create-sample-findings --region us-west-2 \
  --detector-id $DET --finding-types "Recon:EC2/Portscan" \
  --profile example-security

In our environment, the alert reached both email and Slack about one minute after the sample was created. Archive the sample finding afterwards. If an older rule matching GuardDuty events directly exists, disable it, since Tokyo findings would otherwise arrive twice.

aws guardduty archive-findings --region us-west-2 \
  --detector-id $DET --finding-ids <FINDING_ID> \
  --profile example-security

10. Caveats

  • The same finding may arrive more than once. "Security Hub Findings - Imported" is also sent when a finding is updated. Once you start handling a finding, set its workflow status in Security Hub to NOTIFIED or RESOLVED so it no longer matches the rule (NEW).
  • Members are added per region. GuardDuty members added in Tokyo are not added in other regions. Check list-members in every region.
  • Restrict unused regions with an SCP. Denying activity in unused regions with an SCP reduces what you need to monitor. Global services such as IAM and CloudFront use us-east-1, so exclude them from the deny.
  • Check costs during the free trial. GuardDuty and Security Hub CSPM have a 30-day free trial and Inspector a 15-day one. Check the monthly estimate in the console during the trial and narrow protection plans or scan targets as needed. The alerting part (EventBridge, SNS, Amazon Q Developer) costs almost nothing.
FAQ

Frequently Asked Questions

QCan the management account be the delegated administrator?
A

AWS recommends designating an account other than the management account as the delegated administrator for security services. The management account handles billing and SCPs, so the number of people and permissions using it should be kept to a minimum.

QDo I need GuardDuty in regions I don't use?
A

Yes. Leaked credentials are sometimes used to launch EC2 instances (for crypto mining, for example) in regions the owner doesn't watch. Costs scale with data volume, so unused regions cost almost nothing.

QHow much does it cost?
A

It depends on the size of your accounts and the volume of logs. GuardDuty and Security Hub CSPM have a 30-day free trial and Inspector a 15-day one, and the console shows a monthly estimate during the trial. EventBridge (for AWS service events) and Amazon Q Developer in chat applications, used for alerts, are free, and SNS email notifications are free up to 1,000 per month.

QShould Inspector findings be alerted on too?
A

Right after enabling Inspector, you may get a very large number of findings, which is not suitable for alerts. Handle them in the Security Hub console in order of severity and limit alerts to GuardDuty findings.

QI created a GuardDuty alert rule in Tokyo, but findings from other regions don't arrive.
A

GuardDuty events are sent only to EventBridge in the region where the finding occurred. If Security Hub aggregates all regions into Tokyo, switching the rule to Security Hub events lets a single rule in Tokyo catch every region (see section 8).

MOOBONISO/IEC 27001 CertificationAWS Partner Select Tier ServicesKinsta Agency Partner Badge
Copyright © 2026 MOOBON, Inc. All Rights Reserved.
Standard: ISO/IEC 27001:2022
Scope: Web system design support / Development, operation, and maintenance of in-house cloud services / Contract system development, operation, and maintenance / Server construction, operation, and maintenance