SkillSprout
Chapter 3 · Lesson 6
Beginner
5 min read

Security Logging and Security Resources

Overview

When something goes wrong, you need evidence. AWS produces logs at several layers, and also publishes plenty of security guidance. Exam Task 2.4 asks you to know where to find logs and which AWS resources help with security questions.

Think of a building with different recording devices: a visitor book at reception (CloudTrail records who called what), a CCTV on corridors (VPC Flow Logs record network traffic), sign-in sheets for each shop (S3 and load balancer access logs), and a security desk that collects everything (Security Hub). Beyond the building there is a library of how-to guides (Security Blog, Knowledge Center).

Key Concepts

  • AWS CloudTrail records account activity and API calls (management events by default for 90 days in Event history).
  • Amazon CloudWatch Logs collects and stores application, system and service logs.
  • VPC Flow Logs capture IP traffic metadata for network interfaces, subnets or VPCs.
  • S3 server access logs and ELB access logs record requests to buckets and load balancers.
  • AWS Security Hub aggregates and prioritises findings from GuardDuty, Inspector, Macie and other tools.
  • AWS Trusted Advisor has security checks such as open ports and MFA on root.
  • AWS Marketplace offers third-party security products; the Security Blog, Security Center and Knowledge Center offer guidance.
  • Always protect log storage: send logs to a locked-down S3 bucket in a separate account.

Detailed Notes

Where to find which logs

QuestionLog source
Who deleted this bucket or changed this security group?CloudTrail
What did my application print or error on?CloudWatch Logs
Which IP address tried to reach my instance and was it accepted?VPC Flow Logs
Who downloaded this object from S3?S3 server access logs (or CloudTrail data events)
Which clients hit my load balancer?ELB access logs
What DNS queries did my VPC make?Route 53 Resolver query logs
Which findings need attention?GuardDuty, Inspector, Security Hub

CloudTrail essentials

FeatureNotes
Event historyLast 90 days of management events, free and enabled by default
TrailDelivers events to S3 (and optionally CloudWatch Logs) for long-term retention
Event typesManagement events, data events (S3 objects, Lambda), Insights events
Organization trailOne trail capturing all accounts
Log file validationDetects tampering
bash
aws cloudtrail lookup-events \
  --lookup-attributes AttributeKey=EventName,AttributeValue=DeleteBucket \
  --max-results 5

VPC Flow Logs

Flow Logs do not capture packet contents, only metadata: source, destination, ports, protocol, bytes and ACCEPT or REJECT. They are good for diagnosing why a connection fails, for example a security group blocking traffic.

Security Hub and friends

ServiceRole
GuardDutyThreat detection findings
InspectorVulnerability scanning
MacieSensitive data discovery in S3
DetectiveInvestigate root cause of findings
Security HubCentral dashboard and standards checks (CIS, PCI)
Audit ManagerEvidence collection for audits

Where to learn and get help

ResourceUse
AWS Security CenterPortal of security guidance and best practices
AWS Security BlogNews, bulletins and how-to posts
AWS Knowledge CenterAnswers to frequently asked support questions
AWS Trusted AdvisorIn-account recommendations for security gaps
AWS MarketplaceBuy firewalls, antivirus and SIEM tools as AMIs or SaaS
AWS Security BulletinsNotifications about vulnerabilities
AWS Trust and SafetyReport abuse of AWS resources

Reporting abuse

If you suspect that AWS resources are being used for spam, DDoS or malware, contact AWS Trust and Safety through the abuse form or by emailing the abuse address.

Bringing it together

json
{
  "detect": ["GuardDuty", "Inspector", "Macie"],
  "aggregate": "Security Hub",
  "investigate": "Detective + CloudTrail",
  "retain": "S3 bucket with Object Lock in a log-archive account"
}

Real World Example

A fintech company enables an organisation-wide CloudTrail trail that writes to a locked bucket in a dedicated log-archive account. When a security group is unexpectedly opened, CloudTrail shows which role did it and when. VPC Flow Logs reveal rejected traffic from an unfamiliar IP.

Security Hub merges GuardDuty and Inspector findings into one dashboard, and the team follows the AWS Security Blog for new advisories. A paid firewall appliance from AWS Marketplace is added for inspection.

Architecture Diagram

Log sources feeding security review
Architecture
AWS Cloud

Log sources

CloudTrail
VPC Flow Logs
ELB / S3 logs
Log bucket
Security Hubfindings
  1. 1Services write activity and traffic records to their logs.
  2. 2Logs are delivered to a protected S3 bucket or CloudWatch Logs.
  3. 3Detection services analyse the data.
  4. 4Security Hub aggregates findings for the security team.

Best Practices

  • ✓Enable an organisation-wide CloudTrail trail with log file validation.
  • ✓Turn on VPC Flow Logs for critical VPCs.
  • ✓Store logs in a separate, restricted account with Object Lock where needed.
  • ✓Use Security Hub to see all findings in one place.
  • ✓Read the Security Blog and bulletins and report abuse to Trust and Safety.

Common Interview Questions

Exam Tips

CLF-C02 focus

  • "API call history" = CloudTrail; "network traffic metadata" = VPC Flow Logs.
  • "Single pane for security findings" = Security Hub.
  • "Third-party security software" = AWS Marketplace.
  • "Report abuse" = AWS Trust and Safety.

Chapter quiz

Security, Identity and Compliance · 10 questions

  1. 1.A company wants an application running on EC2 to read objects from S3 without storing credentials on the instance. What should they use?

  2. 2.Which AWS service creates and manages encryption keys and logs their use in CloudTrail?

  3. 3.Which service analyses CloudTrail events, VPC Flow Logs and DNS logs to detect malicious activity?

  4. 4.A compliance officer needs to download AWS's SOC 2 report. Where should they go?

  5. 5.Which service would help block SQL injection attempts against a website behind an Application Load Balancer?

  6. 6.Which task can ONLY be performed by the AWS account root user?

  7. 7.A company wants employees to sign in once with their corporate credentials and reach several AWS accounts. Which service is MOST appropriate?

  8. 8.A mobile app needs sign-up and sign-in for millions of end customers, including Google login. Which service should it use?

  9. 9.A security analyst needs to know which user deleted an S3 bucket yesterday. Which service provides this?

  10. 10.A team wants a single dashboard that combines findings from GuardDuty, Inspector and Macie. Which service fits?

0 of 10 answered

Finished this lesson?

0 of 43 lessons done · 0% of the course