AWS Cloud Practitioner · Domain 2 of 4 · 30% of the exam

AWS Cloud Practitioner Domain 2: Security and Compliance

60 free practice questions for Security and Compliance in the AWS Certified Cloud Practitioner (CLF-C02) exam. Try each question first, then open "Show answer" for the correct option and explanation.

Security and Compliance practice questions

  1. Question 1. Under the AWS shared responsibility model, who is responsible for the physical security of data centers?

    1. AWS
    2. The customer's internet provider
    3. The customer
    4. An independent third-party auditor
    Show answer

    Answer: A. AWS

    AWS is responsible for security 'of' the cloud, including facilities, hardware, and the global network.

  2. Question 2. Under the shared responsibility model, who is responsible for configuring security groups on Amazon EC2 instances?

    1. AWS
    2. The customer
    3. AWS Support
    4. The instance's AMI publisher
    Show answer

    Answer: B. The customer

    Customers are responsible for security 'in' the cloud, including network configuration and firewall rules.

  3. Question 3. Who patches the guest operating system of an Amazon EC2 instance?

    1. The customer
    2. AWS
    3. It's patched automatically by EC2
    4. AWS Trusted Advisor
    Show answer

    Answer: A. The customer

    With EC2 (IaaS), the customer manages the guest OS, including updates and security patches.

  4. Question 4. Who patches the database engine for an Amazon RDS instance?

    1. AWS Support, only on request
    2. AWS, as part of the managed service
    3. The customer, by logging into the host
    4. The database vendor directly
    Show answer

    Answer: B. AWS, as part of the managed service

    For managed services like RDS, AWS patches the OS and database engine; customers choose maintenance windows.

  5. Question 5. Which responsibility is SHARED between AWS and the customer?

    1. Customer data classification decisions
    2. Physical security of data center buildings
    3. Patch management and configuration management
    4. Hardware disposal in AWS facilities
    Show answer

    Answer: C. Patch management and configuration management

    AWS patches infrastructure; customers patch their guest OS and applications. Configuration is similarly split.

  6. Question 6. Which is a best practice for the AWS account root user?

    1. Enable MFA and avoid using it for everyday tasks
    2. Use it as the default login for developers
    3. Create access keys for it for daily automation
    4. Share its credentials with the admin team
    Show answer

    Answer: A. Enable MFA and avoid using it for everyday tasks

    Lock away the root user, enable MFA, and use IAM identities for daily work.

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

    1. Close the AWS account or change certain account settings
    2. Launch an Amazon EC2 instance in a new Region
    3. Create a new IAM user with console access
    4. Create an Amazon S3 bucket with default encryption
    Show answer

    Answer: A. Close the AWS account or change certain account settings

    A few tasks, such as closing the account and changing some account settings, require the root user.

  8. Question 8. What is an IAM group used for?

    1. Grouping EC2 instances for load balancing
    2. Sharing access keys among developers
    3. Attaching permissions to multiple IAM users at once
    4. Combining multiple AWS accounts for billing
    Show answer

    Answer: C. Attaching permissions to multiple IAM users at once

    Groups simplify permission management by applying policies to collections of users.

  9. Question 9. What is an IAM role BEST suited for?

    1. Storing long-term passwords for human users
    2. Recording API calls for later security auditing
    3. Grouping human users together by department
    4. Giving temporary credentials to services, apps, or federated users
    Show answer

    Answer: D. Giving temporary credentials to services, apps, or federated users

    Roles are assumed to get temporary security credentials, which avoids long-lived access keys.

  10. Question 10. An application on EC2 needs to read from an S3 bucket. What is the MOST secure way to grant access?

    1. Store an IAM user's access keys on the instance
    2. Make the S3 bucket public
    3. Use the root user's access keys
    4. Attach an IAM role to the instance
    Show answer

    Answer: D. Attach an IAM role to the instance

    Instance roles provide automatically rotated temporary credentials without storing secrets.

  11. Question 11. What does the principle of least privilege mean in IAM?

    1. Grant only the permissions needed to perform a task
    2. Grant administrator access to simplify work
    3. Give every user the same permissions
    4. Remove all permissions from service roles
    Show answer

    Answer: A. Grant only the permissions needed to perform a task

    Least privilege reduces the impact of mistakes and compromised credentials.

  12. Question 12. What is an IAM policy?

    1. A password complexity rule
    2. A JSON document that defines permissions
    3. A billing alarm threshold
    4. A network firewall configuration
    Show answer

    Answer: B. A JSON document that defines permissions

    Policies specify allowed or denied actions on resources, optionally with conditions.

  13. Question 13. Which AWS service provides centralized single sign-on access to multiple AWS accounts and business applications?

    1. AWS IAM Identity Center
    2. AWS Directory Service only
    3. Amazon Cognito
    4. AWS Secrets Manager
    Show answer

    Answer: A. AWS IAM Identity Center

    IAM Identity Center (successor to AWS SSO) manages workforce access across accounts and apps.

  14. Question 14. Which service adds sign-up, sign-in, and user management to web and mobile apps for customers?

    1. AWS IAM Identity Center
    2. AWS Artifact
    3. AWS Organizations
    4. Amazon Cognito
    Show answer

    Answer: D. Amazon Cognito

    Cognito handles customer (end-user) identities, including social and enterprise federation.

  15. Question 15. Where can customers download AWS compliance reports such as SOC reports and ISO certifications?

    1. AWS Trusted Advisor
    2. AWS Config
    3. Amazon Inspector
    4. AWS Artifact
    Show answer

    Answer: D. AWS Artifact

    AWS Artifact provides on-demand access to AWS security and compliance reports and agreements.

  16. Question 16. Which service records API calls made in an AWS account for auditing?

    1. Amazon CloudWatch
    2. Amazon GuardDuty
    3. AWS Config
    4. AWS CloudTrail
    Show answer

    Answer: D. AWS CloudTrail

    CloudTrail logs who did what, when, and from where across the AWS API.

  17. Question 17. Which service tracks resource configuration changes over time and evaluates them against rules?

    1. AWS Config
    2. AWS CloudTrail
    3. Amazon Inspector
    4. AWS Shield
    Show answer

    Answer: A. AWS Config

    Config records configuration history and checks compliance with rules such as 'S3 buckets must be encrypted'.

  18. Question 18. Which service uses machine learning and threat intelligence to detect malicious activity in AWS accounts?

    1. Amazon Macie
    2. Amazon GuardDuty
    3. AWS Artifact
    4. AWS Config
    Show answer

    Answer: B. Amazon GuardDuty

    GuardDuty analyzes sources such as CloudTrail, VPC Flow Logs, and DNS logs to find threats.

  19. Question 19. Which service automatically discovers and protects sensitive data such as PII in Amazon S3?

    1. Amazon Macie
    2. Amazon GuardDuty
    3. Amazon Inspector
    4. AWS Shield
    Show answer

    Answer: A. Amazon Macie

    Macie uses machine learning and pattern matching to identify sensitive data in S3.

  20. Question 20. Which service scans EC2 instances, container images, and Lambda functions for software vulnerabilities?

    1. AWS WAF
    2. Amazon Detective
    3. Amazon Macie
    4. Amazon Inspector
    Show answer

    Answer: D. Amazon Inspector

    Inspector continuously scans workloads for known vulnerabilities and unintended network exposure.

  21. Question 21. Which service aggregates security findings from multiple AWS services into a single view with compliance checks?

    1. AWS Artifact
    2. AWS Security Hub
    3. AWS Firewall Manager
    4. Amazon Detective
    Show answer

    Answer: B. AWS Security Hub

    Security Hub centralizes findings from GuardDuty, Inspector, Macie, and others and runs best-practice checks.

  22. Question 22. Which service helps analyze and visualize security data to investigate the root cause of findings?

    1. AWS Config
    2. Amazon Inspector
    3. AWS Shield Advanced
    4. Amazon Detective
    Show answer

    Answer: D. Amazon Detective

    Detective builds behavior graphs from logs to speed up investigations.

  23. Question 23. Which AWS service provides protection against DDoS attacks at no additional cost for all customers?

    1. AWS Shield Standard
    2. Amazon GuardDuty
    3. AWS Shield Advanced
    4. AWS WAF
    Show answer

    Answer: A. AWS Shield Standard

    Shield Standard automatically protects against common network and transport layer DDoS attacks.

  24. Question 24. Which service offers enhanced DDoS protection, 24/7 access to the Shield Response Team, and cost protection for scaling during attacks?

    1. AWS Shield Standard
    2. Amazon Inspector
    3. AWS Network Firewall
    4. AWS Shield Advanced
    Show answer

    Answer: D. AWS Shield Advanced

    Shield Advanced is a paid tier with advanced detection, response support, and DDoS cost protection.

  25. Question 25. Which service protects web applications from common exploits such as SQL injection and cross-site scripting?

    1. AWS Config
    2. AWS Shield Standard
    3. AWS WAF
    4. Amazon Macie
    Show answer

    Answer: C. AWS WAF

    AWS WAF filters HTTP(S) requests using rules and integrates with CloudFront, ALB, and API Gateway.

  26. Question 26. Which service creates and manages encryption keys used by many AWS services?

    1. AWS Key Management Service (AWS KMS)
    2. AWS Certificate Manager
    3. AWS Secrets Manager
    4. Amazon Macie
    Show answer

    Answer: A. AWS Key Management Service (AWS KMS)

    KMS manages keys and integrates with services such as S3, EBS, and RDS for encryption at rest.

  27. Question 27. Which service provides dedicated, single-tenant hardware security modules in the AWS Cloud?

    1. AWS CloudHSM
    2. AWS Artifact
    3. AWS KMS
    4. AWS Secrets Manager
    Show answer

    Answer: A. AWS CloudHSM

    CloudHSM gives customers exclusive control of HSMs for strict key custody requirements.

  28. Question 28. Which service stores database credentials and can rotate them automatically?

    1. AWS Certificate Manager
    2. AWS KMS
    3. AWS Config
    4. AWS Secrets Manager
    Show answer

    Answer: D. AWS Secrets Manager

    Secrets Manager stores and rotates secrets, and applications retrieve them via API instead of hard-coding.

  29. Question 29. Which service provisions and renews SSL/TLS certificates for use with AWS services?

    1. AWS Certificate Manager (ACM)
    2. AWS Secrets Manager
    3. AWS Artifact
    4. AWS KMS
    Show answer

    Answer: A. AWS Certificate Manager (ACM)

    ACM provides public certificates at no additional cost for integrated services and handles renewal.

  30. Question 30. What is the difference between security groups and network ACLs?

    1. Both are stateless and apply only to the VPC
    2. NACLs support only allow rules; security groups support deny rules
    3. Security groups apply to subnets; NACLs apply to instances
    4. Security groups are stateful at the instance level; NACLs are stateless at the subnet level
    Show answer

    Answer: D. Security groups are stateful at the instance level; NACLs are stateless at the subnet level

    Security groups automatically allow return traffic. NACLs need explicit rules both ways and support deny rules.

  31. Question 31. Which feature of AWS Organizations sets maximum permissions for accounts in an organization?

    1. Security groups in each VPC
    2. Resource tags on each account
    3. Service control policies (SCPs)
    4. IAM groups in the management account
    Show answer

    Answer: C. Service control policies (SCPs)

    SCPs act as guardrails, limiting what IAM identities in member accounts can do, even administrators.

  32. Question 32. Which service helps set up and govern a secure multi-account AWS environment with preconfigured guardrails?

    1. AWS Shield
    2. Amazon Inspector
    3. AWS Control Tower
    4. AWS Artifact
    Show answer

    Answer: C. AWS Control Tower

    Control Tower automates a landing zone using AWS Organizations and best-practice controls.

  33. Question 33. Which AWS Trusted Advisor category checks for issues such as open security group ports and IAM usage?

    1. Service limits
    2. Security
    3. Fault tolerance
    4. Performance
    Show answer

    Answer: B. Security

    Trusted Advisor's security checks flag risky configurations such as unrestricted ports and missing MFA on root.

  34. Question 34. What does enabling multi-factor authentication (MFA) on IAM users provide?

    1. An additional verification factor beyond the password
    2. Encryption of all data in S3
    3. Free access to AWS Support
    4. Automatic password rotation every day
    Show answer

    Answer: A. An additional verification factor beyond the password

    MFA helps prevent account compromise if a password is stolen.

  35. Question 35. How does AWS help customers meet compliance requirements such as PCI DSS or HIPAA?

    1. AWS maintains certified infrastructure; customers must configure their workloads compliantly
    2. Compliance is entirely the customer's job with no AWS input
    3. AWS makes every customer workload automatically compliant
    4. AWS signs compliance certificates for each customer application
    Show answer

    Answer: A. AWS maintains certified infrastructure; customers must configure their workloads compliantly

    AWS provides compliant infrastructure and documentation, but customers remain responsible for their own configurations.

  36. Question 36. Where can customers review and accept agreements such as the AWS Business Associate Addendum (BAA)?

    1. AWS Marketplace
    2. AWS Organizations
    3. AWS Billing console
    4. AWS Artifact
    Show answer

    Answer: D. AWS Artifact

    Artifact includes an agreements section for reviewing and accepting agreements like the BAA.

  37. Question 37. Which statement about encryption of data at rest in Amazon S3 is correct?

    1. S3 doesn't support encryption at rest
    2. Only Glacier storage classes support encryption
    3. New objects are encrypted at rest by default
    4. Encryption must be implemented entirely by the customer's application
    Show answer

    Answer: C. New objects are encrypted at rest by default

    Since January 2023, S3 applies server-side encryption (SSE-S3) to all new objects by default.

  38. Question 38. Which service lets you centrally configure and manage firewall rules, including AWS WAF rules, across accounts?

    1. AWS Shield Standard
    2. AWS Artifact
    3. AWS Firewall Manager
    4. Amazon Detective
    Show answer

    Answer: C. AWS Firewall Manager

    Firewall Manager applies consistent protections across accounts in AWS Organizations.

  39. Question 39. Which service provides a managed, stateful network firewall and intrusion prevention for VPCs?

    1. AWS Network Firewall
    2. Amazon Inspector
    3. AWS WAF
    4. Security groups
    Show answer

    Answer: A. AWS Network Firewall

    Network Firewall filters traffic at the VPC level with stateful rules and IPS capabilities.

  40. Question 40. Which service helps continuously audit AWS usage to simplify risk and compliance assessments against frameworks?

    1. AWS Budgets
    2. AWS Audit Manager
    3. AWS Trusted Advisor
    4. AWS Artifact
    Show answer

    Answer: B. AWS Audit Manager

    Audit Manager automates evidence collection mapped to frameworks such as PCI DSS or GDPR.

  41. Question 41. What should a customer do if an AWS resource is being used to send spam or launch attacks?

    1. Report it to the AWS Trust & Safety team
    2. Open a case with the Shield Response Team
    3. Post details publicly on AWS re:Post
    4. File a dispute with AWS Billing
    Show answer

    Answer: A. Report it to the AWS Trust & Safety team

    AWS Trust & Safety handles reports of abuse involving AWS resources.

  42. Question 42. Where can customers find third-party security products, such as firewalls and scanners, to deploy on AWS?

    1. AWS Knowledge Center
    2. AWS Health Dashboard
    3. AWS Marketplace
    4. AWS Artifact
    Show answer

    Answer: C. AWS Marketplace

    AWS Marketplace is a curated catalog of third-party software, including security solutions.

  43. Question 43. Which statement about penetration testing on AWS is correct?

    1. Customers may test certain services without prior approval, following AWS's policy
    2. All penetration tests require written approval from AWS
    3. Only AWS Professional Services may perform penetration tests
    4. Penetration testing is prohibited on AWS
    Show answer

    Answer: A. Customers may test certain services without prior approval, following AWS's policy

    AWS publishes a list of permitted services for testing without pre-approval, along with prohibited activities.

  44. Question 44. What is the purpose of IAM access keys?

    1. Encrypting objects stored in S3
    2. Signing in to the AWS Management Console
    3. Programmatic access to AWS via the CLI, SDKs, or API
    4. Connecting to EC2 instances over SSH
    Show answer

    Answer: C. Programmatic access to AWS via the CLI, SDKs, or API

    Access keys authenticate programmatic calls. Roles with temporary credentials are preferred where possible.

  45. Question 45. Which tool analyzes IAM policies and resource policies to identify resources shared with external entities?

    1. AWS Trusted Advisor cost checks
    2. AWS Budgets
    3. IAM Access Analyzer
    4. Amazon Inspector
    Show answer

    Answer: C. IAM Access Analyzer

    IAM Access Analyzer finds unintended public or cross-account access and helps validate policies.

  46. Question 46. A company must keep data in a specific country for legal reasons. What AWS capability supports this?

    1. Choosing the AWS Region where data is stored
    2. Enabling AWS Shield Advanced
    3. Using AWS Trusted Advisor
    4. Turning on consolidated billing
    Show answer

    Answer: A. Choosing the AWS Region where data is stored

    Customers control which Region their data resides in. AWS doesn't move it without the customer's action.

  47. Question 47. Which log type captures information about IP traffic going to and from network interfaces in a VPC?

    1. S3 server access logs
    2. VPC Flow Logs
    3. CloudTrail data events
    4. AWS Config history
    Show answer

    Answer: B. VPC Flow Logs

    Flow Logs support troubleshooting and security analysis of network traffic.

  48. Question 48. What does 'security OF the cloud' refer to in the shared responsibility model?

    1. Customers encrypting their own data
    2. AWS protecting the infrastructure that runs all AWS services
    3. Customers configuring IAM users
    4. Customers managing security group rules
    Show answer

    Answer: B. AWS protecting the infrastructure that runs all AWS services

    AWS secures the hardware, software, networking, and facilities that run AWS services.

  49. Question 49. What does 'security IN the cloud' refer to?

    1. AWS securing its data center buildings
    2. AWS managing the hypervisor
    3. AWS maintaining global network hardware
    4. Customers securing their data, identities, and configurations
    Show answer

    Answer: D. Customers securing their data, identities, and configurations

    Customer responsibility varies by service but always includes data and access management.

  50. Question 50. For AWS Lambda, which is the customer's responsibility?

    1. The function code and the permissions it uses
    2. Scaling the underlying servers
    3. Patching the operating system that runs functions
    4. Maintaining the physical hosts
    Show answer

    Answer: A. The function code and the permissions it uses

    With serverless, AWS manages the infrastructure; customers own code, configuration, and IAM permissions.

  51. Question 51. Which service provides a central place for the AWS Health of your resources, including scheduled maintenance affecting them?

    1. AWS Artifact reports
    2. AWS Health Dashboard
    3. AWS Config rules
    4. Amazon Macie
    Show answer

    Answer: B. AWS Health Dashboard

    AWS Health shows events that may affect your resources, such as maintenance or service issues.

  52. Question 52. What is the purpose of AWS Organizations for security?

    1. Centrally manage multiple accounts and apply policies such as SCPs
    2. Detect malware on EC2 instances
    3. Encrypt data across all accounts automatically
    4. Store compliance reports for auditors
    Show answer

    Answer: A. Centrally manage multiple accounts and apply policies such as SCPs

    Organizations provides account structure, policy guardrails, and consolidated billing.

  53. Question 53. A company wants to be alerted when someone signs in with the root user. Which approach works?

    1. Create a cost-optimization check in Trusted Advisor
    2. Turn on default encryption for all S3 buckets
    3. Enable AWS Shield Advanced for the account
    4. Use CloudTrail events with an EventBridge rule to alert
    Show answer

    Answer: D. Use CloudTrail events with an EventBridge rule to alert

    CloudTrail records console sign-ins, and EventBridge rules can send notifications on matching events.

  54. Question 54. Which feature lets users sign in to AWS with credentials from an existing corporate identity provider?

    1. EC2 key pairs for SSH
    2. Identity federation (e.g., SAML 2.0)
    3. S3 bucket policies
    4. Long-term IAM access keys
    Show answer

    Answer: B. Identity federation (e.g., SAML 2.0)

    Federation avoids creating separate IAM users and centralizes identity management.

  55. Question 55. What is an S3 bucket policy?

    1. A lifecycle rule that deletes objects after a period
    2. A setting that selects each object's storage class
    3. A billing rule that caps monthly storage costs
    4. A resource-based policy controlling access to a bucket
    Show answer

    Answer: D. A resource-based policy controlling access to a bucket

    Bucket policies grant or deny access to principals, often used for cross-account access.

  56. Question 56. Which S3 feature prevents objects from ever being made public, overriding bucket policies and ACLs?

    1. S3 Block Public Access
    2. S3 Transfer Acceleration
    3. S3 Versioning
    4. S3 Intelligent-Tiering
    Show answer

    Answer: A. S3 Block Public Access

    Block Public Access provides account- and bucket-level settings to stop public exposure.

  57. Question 57. Which service provides a password policy, credential reports, and user management for an AWS account?

    1. AWS Artifact (compliance)
    2. Amazon Cognito (user pools)
    3. AWS Organizations (SCPs)
    4. AWS Identity and Access Management (IAM)
    Show answer

    Answer: D. AWS Identity and Access Management (IAM)

    IAM manages users, groups, roles, and policies, plus account password policies and credential reports.

  58. Question 58. Which approach BEST protects data in transit to an Application Load Balancer?

    1. Disable security groups on the load balancer
    2. Use HTTP listeners with longer timeouts
    3. Store data in S3 Glacier
    4. Use HTTPS listeners with certificates from ACM
    Show answer

    Answer: D. Use HTTPS listeners with certificates from ACM

    TLS encryption protects data in transit, and ACM simplifies certificate management.

  59. Question 59. AWS Security Hub findings indicate many resources don't follow best practices. What does Security Hub use to check them?

    1. Estimates from the AWS Pricing Calculator
    2. Standards like AWS Foundational Security Best Practices
    3. Customer invoices from the AWS Billing console
    4. Amazon CloudFront cache hit statistics
    Show answer

    Answer: B. Standards like AWS Foundational Security Best Practices

    Security Hub runs automated checks against standards like the CIS AWS Foundations Benchmark.

  60. Question 60. Which service provides managed Microsoft Active Directory in the AWS Cloud?

    1. AWS Directory Service
    2. Amazon Cognito
    3. AWS IAM Identity Center
    4. AWS Secrets Manager
    Show answer

    Answer: A. AWS Directory Service

    AWS Directory Service for Microsoft Active Directory (AWS Managed Microsoft AD) runs real AD domain controllers managed by AWS.

AWS, Amazon Web Services, and AWS Certified are trademarks of Amazon.com, Inc. or its affiliates. These questions are original study material, not questions from the real exam.