Sub topic 11
Managing many accounts and Regions with delegated administrators
This chapter assumes you know AWS Organizations basics (management account, member accounts, organizational units) and that you can run the AWS CLI against more than one account. It also assumes you have enabled GuardDuty in a single account, as in the earlier setup chapter.
Why a delegated administrator
GuardDuty and Security Hub are Regional services. Each account in each Region has its own detector and its own findings. Across 40 accounts and 5 Regions, that is 200 separate places to check.
A delegated administrator is a member account of your organization that you designate to manage a service for everyone else. It sees member findings, enables the service on members, and changes settings centrally. Use a dedicated security account for this role. Do not use the management account, which should hold as few workloads and permissions as possible.
The model
- The Organizations management account picks the delegated administrator. It does this once per Region, per service.
- The delegated administrator account then configures auto-enablement for members.
- Member findings flow to the administrator account. Members can still see their own findings.
Set up GuardDuty
Run this in the management account, once for each Region you use. Replace the account ID with your security account.
aws guardduty enable-organization-admin-account \
--admin-account-id 111122223333 \
--region us-east-1Next, switch to the delegated administrator account. Turn on auto-enablement so every current and future member gets a detector.
DETECTOR_ID=$(aws guardduty list-detectors --region us-east-1 --query 'DetectorIds[0]' --output text)
aws guardduty update-organization-configuration \
--detector-id "$DETECTOR_ID" \
--auto-enable-organization-members ALL \
--region us-east-1The values are NEW (only accounts that join later), ALL (every account), and NONE. Choose ALL for full coverage. Protection plans such as S3 or Malware Protection have their own organization settings, so enabling the base detector does not turn them on.
Set up Security Hub
The pattern is the same. Run the first command in the management account and the second in the administrator account.
aws securityhub enable-organization-admin-account \
--admin-account-id 111122223333 \
--region us-east-1aws securityhub update-organization-configuration \
--auto-enable \
--auto-enable-standards DEFAULT \
--region us-east-1Security Hub also offers central configuration, where the administrator defines policies that apply to chosen accounts and OUs. Central configuration replaces the simple auto-enable flags above, so pick one approach and keep to it.
Aggregate Regions
A delegated administrator covers accounts, not Regions. For Security Hub, create a finding aggregator in one home Region. Findings from the linked Regions are then replicated there.
aws securityhub create-finding-aggregator \
--region-linking-mode ALL_REGIONS \
--region us-east-1GuardDuty has no equivalent aggregator, so you set up the administrator in each Region. Security Hub is then the single place to view the combined results.
Common errors
- Missing Regions: you designated the administrator in
us-east-1only. Accounts in other Regions stay unmanaged and produce no visible findings. - Trusted access not enabled: the service must be allowed to work with Organizations. The console enables this for you. With the CLI you may need to enable the service principal first.
- Members not appearing: auto-enable was set to
NEW, so accounts that already existed were never enrolled. - Wrong account running the command: the designation commands only work in the management account. The configuration commands only work in the administrator account.
Exercise
Your organization uses GuardDuty in three Regions. You designated a delegated administrator in one Region and set auto-enable to ALL. Members in the other two Regions have no detectors. What did you miss, and how do you fix it?
Show answer
The delegated administrator designation and auto-enable setting are Regional. Repeat enable-organization-admin-account in the management account for each of the other two Regions, then run update-organization-configuration with --auto-enable-organization-members ALL in the administrator account in each of those Regions.