Sub topic 3
Managing AWS Security Across Accounts and Regions
Assume you know AWS accounts, Regions, IAM roles, JSON, and basic Python. In a multi-account environment, use AWS Organizations with a delegated administrator account. The organization management account assigns this role, while the delegated administrator enables and manages GuardDuty and Security Hub for member accounts. Repeat the setup in each enabled Region because findings and service configuration are Region-scoped.
| Service | Main role |
|---|---|
| GuardDuty | Detects threats and creates findings |
| Security Hub | Aggregates findings and evaluates controls |
| EventBridge | Routes matching findings |
| Lambda | Runs custom response code |
| Detective | Supports deeper investigation |
Route findings with EventBridge
Security Hub and GuardDuty emit events to Amazon EventBridge. Create a rule in the Region where the findings arrive. A rule can match only high-severity GuardDuty findings:
{
"source": ["aws.guardduty"],
"detail-type": ["GuardDuty Finding"],
"detail": {
"severity": [{ "numeric": [">=", 7] }]
}
}Attach a target such as Lambda, an SNS topic, or an SQS queue. In a multi-account design, route events to a central event bus only when the receiving account allows the sender and the rule explicitly limits accepted events.
Automate response
A Lambda function should validate the event before changing resources. Keep permissions narrow. For example, it might extract the affected instance and create a ticket:
def handler(event, context):
detail = event["detail"]
finding_type = detail["type"]
severity = detail["severity"]
instance_id = (
detail.get("resource", {})
.get("instanceDetails", {})
.get("instanceId")
)
print(f"{finding_type} severity={severity} instance={instance_id}")
return {"type": finding_type, "severity": severity, "instanceId": instance_id}Security Hub automation rules can update finding status, severity, or workflow state when conditions match. Use them for consistent triage. Reserve disruptive actions, such as isolating an instance, for well-tested findings and approved playbooks.
Investigate with Detective
Pivot to Amazon Detective when a finding needs context. Detective links related CloudTrail activity, VPC flow data, users, roles, IP addresses, and resources into an investigation graph. GuardDuty identifies a possible threat; Detective helps explain what happened before and after it.
Control cost and operations
Enable only protection plans that match your risk and data usage. Centralize administration, standardize Regions, monitor finding volume, and review archived findings. Estimate charges for GuardDuty data sources, Security Hub checks, Detective data retention, EventBridge events, Lambda invocations, and log storage. Test sample findings and response rules without generating real incidents.
Exercise
Why should a delegated administrator configure services in every Region that the organization uses?
Show answer
GuardDuty findings and many Security Hub configurations are Region-scoped, so a single-Region setup can leave other Regions unprotected or unmanaged.