D2 · Security and compliance

AWS security services

AWS offers a full ecosystem of security services. The CLF-C02 tests your ability to identify the right service for each security scenario. Know the purpose of each one and their key differences.

Summary table — every security service

ServiceMain functionWhat it detects / protects
StandardAutomatic DDoS protectionLayer 3/4 attacks (volumetric, protocol). Included free for everyone.
AWS Shield AdvancedAdvanced DDoS protectionLayer 7 attacks + 24/7 DRT support + cost protection for DDoS-related spikes.
Web application firewallSQL injection, XSS, custom rules. Deployed on CloudFront/ALB/API Gateway.
ML-based threat detectionAnomalous behavior in VPC Flow Logs, CloudTrail, DNS. Intrusion detection.
Vulnerability scanningCVEs in EC2, containers (ECR), and Lambda functions. Automated continuous scanning.
Sensitive data protection in S3PII data (names, credit cards, SSNs) in S3. Uses ML to classify and alert.
Encryption key managementEncryption keys for S3, EBS, RDS, Lambda, etc. FIPS 140-2 Level 2.
AWS Secrets ManagerSecret storage and rotationDB passwords, API keys. Automatic rotation integrated with RDS.
API call auditingEvery API event: who did what, when, from where.
Compliance and configurationHistory of resource configuration. Is the resource in the correct state?
AWS Security HubUnified security viewAggregates findings from GuardDuty, Inspector, Macie, Config into one dashboard.
AWS ArtifactCompliance and audit reportsAccess to AWS audit reports (SOC, PCI, ISO). For compliance teams.

AWS Shield — DDoS protection

Icon-Architecture/48/Arch_AWS-Shield_48

Managed protection against Distributed Denial of Service (DDoS) attacks

Shield Standard — free for everyone

  • • Automatically enabled for all AWS customers
  • • Protects against layer 3 and 4 DDoS attacks (volumetric and protocol)
  • • Integrated with CloudFront and Route 53
  • • No additional cost
  • • Does not include access to AWS's DDoS response team

Shield Advanced — paid ($3,000/month)

  • • Additional protection against layer 7 (application) attacks
  • • 24/7 access to the AWS DDoS Response Team (DRT)
  • • Cost protection for resource scaling during a DDoS attack
  • • Protection for EC2, ELB, CloudFront, Route 53, Global Accelerator
  • • Real-time attack reports and analysis

AWS WAF — Web Application Firewall

Icon-Architecture/48/Arch_AWS-WAF_48

Protects web applications from common attacks like SQL injection and cross-site scripting (XSS)

What AWS WAF can filter

  • • SQL injection (SQLi)
  • • Cross-site scripting (XSS)
  • • Requests from specific IPs or IP ranges
  • • Requests from specific countries (geo-blocking)
  • • Specific headers, body, or query strings
  • • Rate limiting (request throttling)

Where WAF is deployed

  • • Amazon CloudFront (CDN edge)
  • • Application Load Balancer (ALB)
  • • Amazon API Gateway
  • • AWS AppSync (GraphQL)
Related labD2 · Security and Compliance

Protect an application with AWS WAF

Create a Web ACL with AWS managed rules to block SQL injection and XSS before they reach your application.

Understand what AWS WAF protects and where it deploys (CloudFront, ALB, API Gateway)
Create a Web ACL with an AWS managed rule

+1 more...

9 min6 steps

GuardDuty vs Inspector vs Macie — the critical difference

This is the most common D2 question on the CLF-C02

The exam will give a scenario and ask you to choose between GuardDuty, Inspector, and Macie. Memorize the core difference between each one.

Icon-Architecture/48/Arch_Amazon-GuardDuty_48

Amazon GuardDuty — ML-based threat detection

GuardDuty is a threat detection service that continuously monitors for malicious activity and unauthorized behavior to protect your AWS accounts, workloads, and data.

Data sources analyzed

  • • VPC Flow Logs (network traffic)
  • • AWS CloudTrail (API calls)
  • • DNS Logs (DNS queries)
  • • S3, , RDS, Lambda events

What it detects

  • • Access from known malicious IPs
  • • Anomalous EC2 instance behavior
  • • Unusual data access
  • • Cryptomining activity

Exam trap

GuardDuty = anomalous behavior and active threats in your environment. It does NOT scan code for vulnerabilities or look for sensitive data.

Icon-Architecture/48/Arch_Amazon-Inspector_48

Amazon Inspector — vulnerability scanning

Inspector runs automated security assessments to help improve the security and compliance of applications deployed on AWS.

What it scans

  • • EC2 instances (operating system)
  • • Container images (ECR)
  • • Lambda functions

What it finds

  • • CVEs (known vulnerabilities)
  • • Unintended network exposure
  • • Packages with vulnerabilities

Exam trap

Inspector = vulnerabilities in the SOFTWARE of your workloads (CVEs, outdated packages). It does NOT detect anomalous behavior or sensitive data in S3.

Icon-Architecture/48/Arch_Amazon-Macie_48

Amazon Macie — sensitive data protection

Macie is a data security and privacy service that uses machine learning to automatically discover and protect sensitive data in Amazon S3.

Where it works

  • • Amazon S3 only (buckets and objects)
  • • File content analysis

What it detects (PII)

  • • Names and surnames
  • • Credit card numbers
  • • Social security numbers (SSNs)
  • • Hardcoded AWS credentials

Exam trap

Macie = sensitive data (PII) IN S3. When the scenario mentions "personal data," "GDPR," "PCI DSS" + S3, the answer is Macie.

AWS KMS and Secrets Manager

Icon-Architecture/48/Arch_AWS-Key-Management-Service_48

AWS Key Management Service (KMS)

Creates and controls the encryption keys used to encrypt data across AWS services. Integrated with S3, EBS, RDS, DynamoDB, Lambda, and more.

  • • Customer Managed Keys (CMK): you create and control them
  • • AWS Managed Keys: managed automatically by AWS
  • • FIPS 140-2 Level 2 certified
  • • Full auditing via CloudTrail
Icon-Architecture/48/Arch_AWS-Secrets-Manager_48

AWS Secrets Manager

Stores, rotates, and manages secrets such as database credentials, API keys, and passwords. Removes hardcoded credentials from your code.

  • • Automatic rotation for RDS, Redshift, DocumentDB
  • • Access via API, SDK, or AWS CLI
  • • Automatically encrypted with KMS
  • • KMS = encryption keys. Secrets Manager = secrets/passwords.
Related labD2 · Security and Compliance

Store a secret in AWS Secrets Manager

Store database credentials in Secrets Manager and configure automatic rotation.

Understand why Secrets Manager eliminates credentials hardcoded in code
Store a database credentials secret

+1 more...

8 min7 steps
Related labD2 · Security and Compliance

Enable Amazon GuardDuty

Turn on AWS's managed threat detection and understand which data sources it continuously analyzes.

Understand GuardDuty's threat detection model
Enable GuardDuty on an AWS account

+1 more...

6 min3 steps

AWS CloudTrail — API auditing

Icon-Architecture/48/Arch_AWS-CloudTrail_48

Records every API activity in your AWS account

CloudTrail records every call to the AWS API: who made it, from which IP, at what time, with what parameters, and what the result was. It's AWS's auditing service.

What it records

  • • Who: IAM user, role, or root account
  • • What: service and API operation (CreateInstance, DeleteBucket…)
  • • When: timestamp of each event
  • • From where: source IP address
  • • Result: success or error

Use cases

  • • "Who deleted that S3 bucket yesterday?"
  • • "From what IP was the IAM policy modified?"
  • • Compliance audits (PCI DSS, HIPAA)
  • • Security incident investigation

CloudTrail ≠ CloudWatch

CloudTrail = auditing of API CALLS (who did what). Answers "who?" and "when?" questions.CloudWatch = METRICS monitoring (CPU, memory, latency). Answers "how is it performing?" questions.

AWS Config — configuration compliance

Icon-Architecture/48/Arch_AWS-Config_48

Evaluates, audits, and verifies the configuration of AWS resources

AWS Config records how the configuration of AWS resources changes over time and evaluates whether those configurations comply with your organization's compliance rules.

Questions Config answers

  • • "What was the Security Group's configuration 3 days ago?"
  • • "Which S3 buckets have public access enabled?"
  • • "Which EC2 instances are missing the 'Environment' tag?"
  • • "Which resources changed in the last 24 hours?"

Config vs CloudTrail

  • • Config: "What state is the configuration in?"
  • • CloudTrail: "Who changed the configuration?"
  • • They're complementary, not substitutes
  • • Config focuses on the resource's STATE

Security Hub and AWS Artifact

Icon-Architecture/48/Arch_AWS-Security-Hub_48

AWS Security Hub

A centralized, unified view of security alerts and findings from multiple AWS services (GuardDuty, Inspector, Macie, Config, IAM Access Analyzer).

  • • A single dashboard for your entire security posture
  • • An overall Security Score
  • • Standards compliance (CIS, PCI DSS)
Icon-Architecture/48/Arch_AWS-Artifact_48

AWS Artifact

An on-demand access portal for AWS compliance reports and agreements. For audit teams that need AWS compliance documentation.

  • • SOC 1, SOC 2, SOC 3 reports
  • • ISO 27001, PCI DSS certifications
  • • Agreements: BAA (HIPAA), NDA
  • • NOT a technical service — it's documentation

Encryption in AWS

AWS supports encryption in two fundamental states that must both be present for a complete security posture.

Encryption at rest

Stored data is encrypted. If someone gains physical access to the disks, they can't read the data without the keys.

  • • S3 SSE: automatic Server-Side Encryption for all objects
  • • EBS encryption: volumes encrypted with KMS
  • • RDS encryption: enable it when creating the instance (not afterward)
  • • DynamoDB: encrypted at rest by default

Encryption in transit

Data moving between systems is encrypted. Protects against interception attacks (man-in-the-middle).

  • • HTTPS/TLS: for all communication with AWS APIs
  • • SSL on RDS: encrypted connections between app and DB
  • • VPN: encrypts traffic between on-premises and AWS
  • • ACM: manages SSL/TLS certificates for HTTPS
Icon-Architecture/48/Arch_AWS-Key-Management-Service_48

AWS KMS — Key Management Service

Generates and manages symmetric and asymmetric encryption keys. Integrated with nearly every AWS service that supports encryption.

  • • Customer Managed Keys (CMK): you control the key
  • • AWS Managed Keys: managed automatically by AWS
  • • Full auditing via CloudTrail
  • • FIPS 140-2 Level 2 certified

— Hardware Security Module

A dedicated hardware security module. Unlike KMS (multi-tenant), CloudHSM gives you exclusive physical control of the hardware where keys are stored.

  • • FIPS 140-2 Level 3 (highest level)
  • • For strict compliance that requires physical control
  • • More expensive than KMS — only when regulation requires it

KMS = for most cases. CloudHSM = when regulation requires physical control of keys (e.g., strict PCI DSS level 1).

Compliance resources

Icon-Architecture/48/Arch_AWS-Artifact_48

AWS Artifact

A portal for downloading AWS audit reports and compliance agreements. Free, on demand.

  • • SOC 1, SOC 2, SOC 3
  • • ISO 27001, ISO 27017, ISO 27018
  • • PCI DSS
  • • BAA (Business Associate Agreement) for HIPAA
Icon-Architecture/48/Arch_AWS-Audit-Manager_48

AWS Audit Manager

Automates evidence collection for audits. Maps controls to compliance frameworks (GDPR, HIPAA, PCI DSS, SOC 2) and generates audit-ready reports.

  • • Continuous automated assessments
  • • Evidence collection from Config, CloudTrail, etc.
  • • Reports ready for auditors

Compliance standards on AWS

StandardScopeAWS support
SOC 1/2/3Internal controls, operational securityYes — reports available in AWS Artifact
ISO 27001Information security managementYes — certification for AWS infrastructure
PCI DSSPayment card dataYes — AWS infrastructure is PCI DSS level 1
HIPAAHealth information (US)Yes — with a signed BAA, eligible services
GDPRPersonal data protection (EU)Yes — tools and a DPA available

Other security services

Icon-Architecture/48/Arch_Amazon-Detective_48

Amazon Detective

Investigates security incidents and analyzes logs (GuardDuty, CloudTrail, VPC Flow) to find the root cause using graph-based analysis.

For the exam: GuardDuty detects; Detective investigates. For post-incident forensic analysis.
Icon-Architecture/48/Arch_AWS-Certificate-Manager_48

AWS Certificate Manager (ACM)

Provisions, manages, and renews SSL/TLS certificates for free. Integrates with CloudFront, ALB, API Gateway.

For the exam: ACM renews certificates automatically. No cost for public certificates used with AWS services.
Icon-Architecture/48/Arch_AWS-Firewall-Manager_48

AWS Firewall Manager

Centralized management of AWS WAF, Shield Advanced, and Security Groups across every account in AWS Organizations.

For the exam: For companies with multiple accounts that need consistent network security policies.
Icon-Architecture/48/Arch_Amazon-Cognito_48

Amazon Cognito

User authentication for web and mobile applications. User Pools (user management) + Identity Pools (AWS access). Also a security service.

For the exam: Cognito = auth for the users of YOUR app. IAM = access control for AWS services. They're different.
Related labD2 · Security and Compliance

Configure Security Groups

Learn to control network traffic with EC2 Security Groups.

Understand what a Security Group is
Create inbound and outbound rules

+1 more...

10 min7 steps
Related labD2 · Security and Compliance

Enable AWS CloudTrail

Turn on activity auditing in your AWS account with CloudTrail for compliance.

Understand the importance of auditing in the cloud
Create a trail to log account activity

+1 more...

10 min5 steps

Did you get this topic?

Test what you just learned

A security team discovered that some Amazon S3 buckets contain files with credit card numbers and customers' personal data. Which AWS service should be implemented to automatically detect and alert on this kind of sensitive data in S3?

Ready to test "AWS security services"?

Put what you learned to the test with original CLF-C02 exam questions.

Start CLF-C02 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.