📖 Scenario: You are working as a cloud security analyst. Your manager wants you to set up AWS Security Hub to get a centralized view of security alerts and compliance status across multiple AWS accounts.This will help your team quickly identify and respond to security issues.
🎯 Goal: Set up a basic AWS Security Hub configuration using Infrastructure as Code (IaC) to enable Security Hub in a single AWS account.You will create the initial resource, configure a setting, and finalize the Security Hub setup.
📋 What You'll Learn
Create a resource block to enable AWS Security Hub
Add a configuration variable to specify the region
Use the main configuration block to enable Security Hub with default standards
Complete the configuration with the required final attribute to activate Security Hub
💡 Why This Matters
🌍 Real World
Security Hub helps organizations monitor and improve their cloud security posture by aggregating security alerts and compliance checks in one place.
💼 Career
Cloud security engineers and architects use Security Hub to maintain compliance and quickly respond to security threats across AWS environments.
Progress0 / 4 steps
1
Create Security Hub resource block
Create a Terraform resource block called aws_securityhub_account to enable Security Hub in your AWS account.
AWS
Hint
This resource enables Security Hub in your AWS account.
2
Add region variable
Add a Terraform variable called region with default value us-east-1 to specify the AWS region for Security Hub.
AWS
Hint
Variables help you configure your infrastructure flexibly.
3
Enable Security Hub with default standards
Inside the aws_securityhub_account resource block, add the depends_on attribute with an empty list and enable the default standards by adding the standards_subscription block with standards_arn set to arn:aws:securityhub:::ruleset/cis-aws-foundations-benchmark/v/1.2.0.
AWS
Hint
This enables the CIS AWS Foundations Benchmark standard in Security Hub.
4
Finalize Security Hub activation
Add the enable_default_standards attribute set to true inside the aws_securityhub_account resource block to activate Security Hub with default standards.
AWS
Hint
This final step activates Security Hub with the default security standards.
Practice
(1/5)
1. What is the main purpose of AWS Security Hub?
easy
A. To manage user permissions
B. To create virtual machines
C. To show all your security alerts in one place
D. To store large amounts of data
Solution
Step 1: Understand Security Hub's role
AWS Security Hub collects and shows security alerts from different services.
Step 2: Compare options with Security Hub's function
Only To show all your security alerts in one place describes showing security alerts in one place, which matches Security Hub's purpose.
Final Answer:
To show all your security alerts in one place -> Option C
Expecting user management features in Security Hub
Thinking it shows bucket contents
4. You enabled Security Hub but do not see any findings. What could be the reason?
medium
A. Security Hub is disabled automatically after enabling
B. No integrated AWS services are sending security data to Security Hub
C. You need to create an S3 bucket first
D. Security Hub only works in specific AWS regions
Solution
Step 1: Check data sources for Security Hub
Security Hub shows findings only if integrated services send data to it.
Step 2: Evaluate other options
Security Hub does not disable itself automatically; no S3 bucket is needed; it works in many regions but not limited to one.
Final Answer:
No integrated AWS services are sending security data to Security Hub -> Option B
Quick Check:
No findings = no data sent [OK]
Hint: Check if services send data to Security Hub [OK]
Common Mistakes:
Assuming Security Hub disables itself
Thinking S3 bucket is required
Believing Security Hub is region-limited
5. You want to improve your cloud security by automatically aggregating findings from multiple AWS accounts into one Security Hub dashboard. What should you do?
hard
A. Manually copy findings from each account to a central S3 bucket
B. Create IAM users in each account and share credentials
C. Use EC2 instances to collect and forward security data
D. Enable Security Hub in the master account and invite member accounts to send findings