AWS Certified Cloud Practitioner (CLF-C02) · AWS
Security and Compliance
15 practice questions covering 30% of the official AWS Certified Cloud Practitioner (CLF-C02) blueprint. Every item includes a worked explanation of the correct answer.
View all 4 domains in AWS Certified Cloud Practitioner (CLF-C02)
Syllabus Coverage & Domain Overview
Security and Compliance is the largest single block of the Cloud Practitioner exam, at 30 percent of scored content. The official outline splits it into four parts: the shared responsibility model, security, governance and compliance concepts, access management, and the components and resources AWS offers for security. The exam is aimed at a broad audience, so you are expected to recognise what each service is for and when to choose it. You are not expected to configure anything.
The shared responsibility model underpins the rest of the topic. AWS is responsible for the security of the cloud itself, meaning facilities, hardware and the foundation that runs the services. The customer is responsible for security in the cloud, which means data, identities, permissions and configuration. The key point is that the split moves with the service. On Amazon EC2 you patch the guest operating system, on Amazon RDS AWS handles much of the database platform while you still manage access and data, and on AWS Lambda you are left mainly with your code, permissions and data. Some duties, such as awareness and training, or patch management, are shared.
For governance and compliance, learn which service answers which question. AWS Artifact supplies compliance reports and agreements. AWS CloudTrail records who did what through API activity, AWS Config tracks resource configuration against rules, and Amazon CloudWatch handles monitoring and alarms. Know the difference between encryption in transit and at rest. The outline also expects you to know that compliance requirements differ between services and between regions and industries. Among the protective services, Amazon GuardDuty detects threats, Amazon Inspector looks for vulnerabilities, AWS Security Hub gathers findings in one place, AWS Shield defends against DDoS attacks, AWS WAF filters web requests, and AWS Firewall Manager applies rules across accounts. AWS Trusted Advisor flags security issues, and AWS Marketplace offers third-party security products.
Access management centres on AWS IAM and the principle of least privilege. Be clear on users, groups, roles, and managed versus custom policies. Understand why the root user must be protected, which methods protect it, and that a small set of tasks can only be done by the root user. Distinguish multi-factor authentication, federation, cross-account roles and AWS IAM Identity Center for workforce sign-in. Know that access keys and passwords need careful handling, and that services such as AWS Secrets Manager and AWS Systems Manager are used to store credentials rather than embedding them in code.
Questions are usually short scenarios asking which service or which party fits a stated need, so the common traps come from near-neighbours. Detecting a threat is not the same as filtering traffic, auditing API calls is not the same as checking configuration, and getting a compliance report is not the same as enforcing compliance. Another trap is assuming AWS handles everything for a managed service. When two answers look plausible, check whether the scenario asks about the past, which suggests logging, or the present state, which suggests configuration or findings tools. To prepare, build a one-line purpose for each service named in the outline, practise sorting tasks into AWS or customer responsibility for EC2, RDS and Lambda, and rehearse the root user and least privilege rules until they are automatic.
In the official AWS Certified Cloud Practitioner (CLF-C02) examination blueprint, Security and Compliance carries a weightage of 30%. Out of the total examination duration of 1 hr 30 min, candidates should budget approximately 27 min for questions from this domain to maintain pace across the paper.
How to Master Security and Compliance for AWS Certified Cloud Practitioner (CLF-C02)
Our 15 published questions in Security and Compliance are written for PrepIQ Hub and checked as set out in our editorial policy. Each item is written to the easy difficulty level of the AWS exam:
- Targeted Topic Drills: Launch Topic Practice mode to work exclusively through Security and Compliance items and review the step-by-step derivation after each submission.
- Negative Marking Discipline: The AWS Certified Cloud Practitioner (CLF-C02) applies no negative marking penalty, so practice eliminating the three distractors systematically on every Security and Compliance item.
- Benchmark Target: Aim for at least 70% accuracy in Security and Compliance drills before moving to full-paper simulations.
Security and Compliance worked examples
Security and Compliance questions from the AWS Certified Cloud Practitioner (CLF-C02) syllabus, answered in full. Try each one before opening the explanation.
Example 1 · Security and Compliance · easy
A company has fifty AWS accounts in AWS Organizations and wants employees to sign in once with their corporate identity provider to access assigned accounts with temporary credentials. Which service provides this capability?
Show answer and explanation
Correct answer: C. AWS IAM Identity Center for centralized multi-account workforce access
Why
AWS IAM Identity Center is the AWS service designed for workforce access across many accounts. It integrates with AWS Organizations, so an administrator enables it once in the management account and then defines permission sets and assigns users or groups to specific accounts. Employees can authenticate against its built-in directory, Microsoft Active Directory, or an external identity provider such as Okta or Microsoft Entra ID through SAML 2.0 federation. After one sign-in to the access portal, they pick an assigned account and role and receive short-lived temporary credentials, so no long-term access keys need to be created or rotated. The common trap is choosing IAM users because IAM is the familiar identity service. IAM users are long-term identities scoped to a single account, which does not scale to fifty accounts and does not provide single sign-on. Another trap is confusing workforce identity, which is Identity Center, with customer identity, which is Cognito.
- A. Amazon Cognito user pools designed for consumer mobile app sign-up — Amazon Cognito user pools provide sign-up, sign-in and token issuance for end users of web and mobile applications. They are a customer identity service and do not assign employees to roles across AWS accounts in an organization.
- B. Individual IAM users duplicated manually inside each of the fifty accounts — IAM users are long-term identities that exist in a single account, and each carries its own password and possibly access keys. Duplicating them in fifty accounts creates heavy administrative overhead and security risk, gives no single sign-on, and does not use temporary credentials.
- D. AWS Resource Access Manager for sharing VPC subnets across accounts — AWS Resource Access Manager lets you share resources such as VPC subnets, Transit Gateways and license configurations with other accounts. It shares resources and does not authenticate people or federate a corporate identity provider.
Example 2 · Security and Compliance · medium
A security team wants continuous, automated threat detection that analyzes AWS CloudTrail management events, Amazon VPC Flow Logs, and DNS logs to identify cryptocurrency mining or compromised credentials. Which service should they enable?
Show answer and explanation
Correct answer: A. Amazon GuardDuty managed intelligent threat detection service
Why
Amazon GuardDuty is the AWS managed threat detection service that continuously analyzes foundational data sources, including CloudTrail management events, VPC Flow Logs, and DNS query logs, using machine learning, anomaly detection, and threat intelligence feeds. It produces findings for activity such as cryptocurrency mining, communication with known malicious IP addresses, and use of compromised credentials. It is enabled with a few clicks, needs no agents or sensors, and does not require you to turn on or manage the log sources yourself, which is why it fits a requirement for continuous, automated detection. The exam concept is matching the described capability to the right security service: GuardDuty detects threats, Macie discovers sensitive data, Inspector scans for vulnerabilities, and Detective investigates root cause. The most common trap is picking a service that sounds security-related but handles a different job, such as secrets storage or sensitive data discovery, instead of the one that analyzes logs for malicious behavior.
- B. AWS Secrets Manager service for rotating database credentials — AWS Secrets Manager is a service for storing, retrieving, and automatically rotating secrets such as database credentials and API keys. It does not analyze CloudTrail, VPC Flow Logs, or DNS logs, so it cannot detect cryptocurrency mining or compromised credentials.
- C. AWS Service Catalog for publishing pre-approved CloudFormation products — AWS Service Catalog lets organizations publish and govern pre-approved CloudFormation-based products for self-service deployment. It is a governance and provisioning tool, not a threat detection service, and it does not analyze logs for malicious activity.
- D. Amazon Macie service for discovering sensitive PII inside S3 buckets — Amazon Macie uses machine learning and pattern matching to discover and protect sensitive data such as PII in Amazon S3 buckets. It focuses on data classification and not on analyzing network or DNS logs for threats, so it would not identify cryptocurrency mining or compromised credentials.
Example 3 · Security and Compliance · medium
A company deploys a PostgreSQL database on Amazon RDS. Under the AWS Shared Responsibility Model, which two tasks remain the customer's responsibility? (Select two.)
Show answer and explanation
Correct answers: A. Managing database user accounts, schema permissions, and data lifecycle; D. Configuring inbound VPC security group rules for database network access
Why
Amazon RDS is a managed service, so AWS takes on more of the stack than with a self-managed database on EC2. Under the Shared Responsibility Model, AWS is responsible for security of the cloud: physical facilities, hardware, host operating system, and database engine patching. The customer remains responsible for security in the cloud, which for RDS means what happens inside the database and around it. Managing database user accounts, schema permissions, and the data lifecycle (what is stored, how long it is kept, and who can read it) is the customer's job. Configuring VPC security group rules that control which sources can reach the database port is also the customer's job, because the customer controls their own network configuration. The common trap is assuming that a managed service removes all responsibility from the customer. It only shifts the line upward. Another trap is forgetting that OS and hardware tasks, though they sound like operations work, belong to AWS here.
- B. Patching the underlying Linux operating system hosting the RDS database instance — The operating system underneath an RDS instance is managed by AWS, and the customer has no access to it. This would be the customer's task only on a self-managed database installed on an EC2 instance.
- C. Replacing failed solid-state drives inside the AWS Availability Zone server racks — Replacing failed drives in AWS data centers is a physical infrastructure task. AWS handles it as part of security of the cloud, and customers never access the hardware.
Example 4 · Security and Compliance · medium
A compliance officer needs an auditable record of who deleted an Amazon S3 bucket last Tuesday, including the caller's IAM identity, source IP address, and timestamp. Which AWS service provides this record?
Show answer and explanation
Correct answer: D. AWS CloudTrail event history logging account API calls and identities
Why
AWS CloudTrail is the service that records API activity in an AWS account. Every call to delete an S3 bucket, whether made from the console, CLI, SDK or another service, is captured as a management event. Each event record includes the IAM identity that made the call, the source IP address, the event time and the request parameters. CloudTrail Event History keeps the previous 90 days of management events by default, so an event from last Tuesday can be looked up without any setup. For longer retention, a trail can deliver logs to S3, and CloudTrail Lake can store and query them. The common trap is confusing CloudTrail with AWS Config or Amazon CloudWatch. Config tracks resource configuration changes over time, and CloudWatch collects metrics and logs about performance. When a question asks who did what, when, and from where, the answer is CloudTrail. Distractors usually name services that sound like monitoring but serve a different purpose.
- A. AWS X-Ray distributed tracing service for microservice latency bottlenecks — AWS X-Ray is a distributed tracing service that follows requests through application components to find latency and errors. It does not record who made account-level API calls such as deleting an S3 bucket.
- B. Amazon CloudFront real-time viewer cache-hit ratio statistics — Amazon CloudFront is a content delivery network, and its statistics describe viewer requests and cache behavior for distributed content. They contain no record of IAM identities or bucket deletion API calls.
- C. AWS Compute Optimizer right-sizing recommendations for EC2 instances — AWS Compute Optimizer analyzes resource utilization and recommends right-sized EC2 instances and other compute resources to cut cost or improve performance. It does not audit user actions or record who deleted a bucket.
Example 5 · Security and Compliance · easy
A cloud administrator creates a new AWS account. What are the recommended immediate security steps for the AWS account root user?
Show answer and explanation
Correct answer: B. Enable MFA on root, delete root access keys, and use IAM roles daily
Why
The root user has unrestricted access to everything in an AWS account and cannot be limited by IAM policies, so protecting it is the first task after account creation. The recommended steps are to enable multi-factor authentication on the root user, delete any root access keys (or never create them), and then do daily work with an IAM role, IAM user, or IAM Identity Center identity that follows least privilege. The root user is reserved for the small set of tasks that only it can perform, such as changing the account's support plan or closing the account. The common trap is to treat the root user as a convenient administrator. Programmatic access with long-term root keys is especially risky, because a leaked key gives an attacker complete control of the account. Option B matches the AWS shared responsibility guidance: you secure the credentials and access you manage.
- A. Share the root password with all developers so they can troubleshoot permissions — This describes sharing the root password among many people. It removes individual accountability, since actions cannot be traced to a person, and it breaks least privilege by giving everyone unlimited access. Developers should get scoped IAM permissions instead.
- C. Embed root access keys inside the company's public GitHub build scripts — This describes exposing root access keys in a public repository. Anyone who finds the keys gets full control of the account, and automated scanners find leaked keys quickly. It is the opposite of the advice to delete root access keys.
- D. Disable password complexity rules so automated scripts can sign in as root — This describes weakening the password policy so scripts can sign in as root. Scripts should never use root; they should use IAM roles with temporary credentials. Weaker passwords also make the most powerful identity easier to compromise.
Example 6 · Security and Compliance · medium
An application running on an Amazon EC2 instance needs temporary read access to an Amazon S3 bucket without storing long-term access keys on the filesystem. What should the administrator attach to the EC2 instance?
Show answer and explanation
Correct answer: D. An IAM role with least-privilege S3 read permissions via an instance profile
Why
An IAM role attached to the EC2 instance through an instance profile is the AWS-recommended way to give applications access to other AWS services. The instance profile is the container that passes the role to the instance. The AWS SDK and CLI automatically retrieve temporary security credentials from the instance metadata service, and these credentials are rotated automatically before they expire, so no long-term access keys are ever stored on disk. Attaching a policy that allows only S3 read actions follows the least-privilege principle, which is a core part of the AWS shared responsibility model on the customer side. The most common trap is choosing an option that sounds like identity management but cannot actually be attached to a compute resource, such as groups, or reaching for access keys because they are familiar. Remember that roles provide temporary credentials, while IAM users and root keys are long-term credentials.
- A. Root account access keys stored inside an environment variable file — Root account access keys are long-term credentials with unrestricted access to the entire account. Storing them in a file on an instance violates least privilege and the best practice of avoiding root keys, and it also contradicts the requirement of not storing long-term keys on the filesystem.
- B. An IAM user group with an inline S3 policy attached to the subnet — An IAM group is a collection of IAM users used to apply permissions to people, and it cannot be assumed by or attached to an EC2 instance or a subnet. Subnets are networking constructs in a VPC and have no role in IAM authorization.
- C. An AWS Key Management Service asymmetric key pair stored on the EBS volume — AWS KMS keys are used to encrypt and decrypt data and to sign or verify, not to authenticate an instance to S3 or grant it IAM permissions. A key pair stored on an EBS volume would also be a stored secret and would not provide temporary S3 access.
Example 7 · Security and Compliance · medium
A team migrates a workload from self-managed Amazon EC2 instances to AWS Lambda functions. How does the AWS Shared Responsibility Model shift after this migration?
Show answer and explanation
Correct answer: B. AWS assumes responsibility for operating system and runtime patching
Why
Under the AWS Shared Responsibility Model, AWS is responsible for security of the cloud and the customer is responsible for security in the cloud. How the line is drawn depends on the service type. With self-managed Amazon EC2, the customer patches and configures the guest operating system, installs and updates the runtime, and manages the application. AWS Lambda is a managed, serverless compute service. AWS runs the servers, the operating system, and the language runtime environments, and it patches them. The customer is left with the function code, the IAM execution role and permissions, the configuration, and the data. The general rule is that the more managed the service, the more responsibility moves to AWS. The most common trap is thinking that serverless removes all customer responsibility. IAM permissions, code security, and data protection always remain with the customer, and a misconfigured execution role is still the customer's problem.
- A. The customer becomes responsible for patching the physical hypervisor hosts — Physical hosts and hypervisors are always AWS's responsibility, on EC2 as well as Lambda. A migration cannot move that duty to the customer, and the shift actually moves duties toward AWS.
- C. AWS assumes responsibility for writing least-privilege IAM execution policies — Writing least-privilege IAM execution policies is a customer duty in every service, including Lambda. AWS provides the IAM service, but the customer decides what permissions each function gets.
- D. The customer becomes responsible for maintaining Availability Zone fiber links — The physical network, including the fiber links between Availability Zones, is part of AWS global infrastructure and is always managed by AWS. The customer never takes this on, and moving to Lambda does not change that.
Example 8 · Security and Compliance · easy
An external financial auditor asks a cloud administrator for copies of AWS ISO 27001 and SOC 2 compliance reports. Which AWS service provides on-demand access to these third-party audit reports?
Show answer and explanation
Correct answer: B. AWS Artifact self-service portal for compliance reports and agreements
Why
AWS Artifact is the self-service portal where customers download AWS compliance documentation on demand, including third-party audit reports such as SOC 1, 2 and 3, ISO 27001 certifications, and PCI DSS attestations. It also lets you review and accept agreements such as the Business Associate Addendum (BAA) for HIPAA workloads. This fits the shared responsibility model: AWS is responsible for security of the cloud and proves it through independent audits, while customers use those reports as evidence when their own auditors ask about the underlying infrastructure. Reports are available through the console without opening a support case. The common trap is picking a service that sounds security related, such as Inspector or CloudTrail. Those tools produce data about your own resources or account activity. They do not supply AWS's own audit reports. Whenever a question mentions auditors, compliance reports, or agreements, think AWS Artifact.
- A. Amazon Inspector automated software vulnerability scanning service — Amazon Inspector is an automated vulnerability management service that scans EC2 instances, container images in ECR, and Lambda functions for software vulnerabilities and unintended network exposure. It assesses your workloads and does not provide AWS's third-party audit reports.
- C. AWS CloudTrail governance service for recording account API activity — AWS CloudTrail records API calls and account activity so you can audit who did what in your own account. It is a logging and governance tool for your usage, not a source of AWS's ISO 27001 or SOC 2 reports.
- D. AWS Certificate Manager service for provisioning public TLS certificates — AWS Certificate Manager provisions, manages, and renews SSL/TLS certificates for services such as load balancers and CloudFront. It deals with encryption in transit and has nothing to do with distributing compliance audit documents.
Every worked example on this page passed our independent verification before publication — how that works is set out in our editorial policy. Spotted an error? Tell us through the contact page and we will correct it.
All 8 Security and Compliance questions with answers
- A company has fifty AWS accounts in AWS Organizations and wants employees to sign in once with their corporate…
- A security team wants continuous, automated threat detection that analyzes AWS CloudTrail management events, Amazon…
- A company deploys a PostgreSQL database on Amazon RDS. Under the AWS Shared Responsibility Model, which two tasks…
- A compliance officer needs an auditable record of who deleted an Amazon S3 bucket last Tuesday, including the caller's…
- A cloud administrator creates a new AWS account. What are the recommended immediate security steps for the AWS account…
- An application running on an Amazon EC2 instance needs temporary read access to an Amazon S3 bucket without storing…
- A team migrates a workload from self-managed Amazon EC2 instances to AWS Lambda functions. How does the AWS Shared…
- An external financial auditor asks a cloud administrator for copies of AWS ISO 27001 and SOC 2 compliance reports…
All Syllabus Domains in AWS Certified Cloud Practitioner (CLF-C02)
Cloud Concepts
12 questions · 24%Security and Compliance (Current domain)
15 questions · 30%Cloud Technology and Services
13 questions · 34%Billing, Pricing, and Support
11 questions · 12%
AWS and Amazon Web Services are trademarks of Amazon.com, Inc. PrepIQ Hub is not affiliated with, endorsed by, or sponsored by Amazon Web Services.