Courseiva

CCNA Security Governance Questions

47 questions · Security Governance topic · All types, answers revealed

1
MCQeasy

A developer has created an S3 bucket policy that grants public read access. The security team wants to prevent any S3 bucket from becoming public. Which AWS service can enforce this restriction across all accounts?

A.AWS CloudTrail with a metric filter
B.S3 Block Public Access settings on each account
C.A service control policy (SCP) denying s3:PutBucketPolicy
D.IAM permissions boundary
AnswerC

SCPs can deny actions across all accounts in an organization.

Why this answer

A service control policy (SCP) is the correct choice because it operates at the AWS Organizations level to centrally restrict permissions across all accounts. By creating an SCP that denies the s3:PutBucketPolicy action, you prevent any account in the organization from modifying bucket policies to grant public access, regardless of individual account settings. This enforces a guardrail that cannot be overridden by account administrators.

Exam trap

The trap here is that candidates often confuse preventive controls (like SCPs) with detective controls (like CloudTrail) or assume that S3 Block Public Access settings applied per account are sufficient for centralized enforcement, but SCPs are the only service that can enforce restrictions across all accounts in an organization from a single point.

How to eliminate wrong answers

Option A is wrong because AWS CloudTrail with a metric filter only monitors and alerts on API calls (e.g., s3:PutBucketPolicy) but does not prevent the action from occurring; it is a detective control, not a preventive one. Option B is wrong because S3 Block Public Access settings must be configured on each account individually and can be disabled by account administrators, so they do not enforce a restriction across all accounts from a central point. Option D is wrong because IAM permissions boundaries limit the maximum permissions for IAM users or roles but do not apply to the root user or to service-linked roles, and they cannot prevent bucket policy changes made by an account administrator with full control.

2
Multi-Selectmedium

A security engineer is designing a data encryption strategy for an S3 bucket that contains sensitive information. Which TWO of the following are valid options for enforcing encryption at rest?

Select 2 answers
A.Use an AWS KMS key with automatic key rotation.
B.Enable S3 default encryption on the bucket.
C.Enable AWS CloudTrail to log all object uploads.
D.Attach an IAM policy to users to require encryption.
E.Use a bucket policy to deny PutObject requests without the x-amz-server-side-encryption header.
AnswersB, E

Correct: Automatically encrypts new objects.

Why this answer

The correct options are B and E. Option B: Enabling S3 default encryption on the bucket automatically encrypts objects at rest using the specified encryption method (SSE-S3 or SSE-KMS). Option E: A bucket policy can deny PutObject requests that do not include the x-amz-server-side-encryption header, ensuring objects are uploaded with encryption enforced.

Option A is incorrect because using an AWS KMS key with automatic key rotation is a method of encryption, not an enforcement mechanism; the question asks for ways to enforce encryption at rest. Option C is incorrect because AWS CloudTrail logs API calls, not encryption enforcement. Option D is incorrect because IAM policies control user permissions but cannot directly enforce encryption at the service level; they can deny actions but encryption enforcement is typically done via bucket policies or default encryption.

3
MCQmedium

A company is using AWS Organizations to manage multiple accounts. The security team needs to enforce that all newly created S3 buckets across the organization have server-side encryption (SSE-S3) enabled by default. Which solution is MOST operationally efficient?

A.Create an AWS Lambda function that is triggered by S3 event notifications to enable encryption on any new bucket.
B.Set a default bucket encryption policy in each account’s S3 console.
C.Apply an SCP to the root organizational unit that denies s3:CreateBucket if the bucket lacks encryption settings.
D.Use AWS Config with a managed rule s3-bucket-server-side-encryption-enabled to trigger remediation.
AnswerC

SCPs can deny actions with conditions, preventing noncompliant bucket creation across all accounts.

Why this answer

Applying an SCP to the root organizational unit that denies s3:CreateBucket unless encryption settings are specified is the most operationally efficient because it prevents noncompliant buckets from being created at the organizational level. Option A (Lambda triggered by S3 events) is reactive and requires ongoing management. Option B (setting default encryption per account) does not enforce across all accounts and can be overridden.

Option D (AWS Config rule with remediation) only detects and fixes noncompliant buckets after creation, which is less efficient than prevention.

4
MCQmedium

A company uses AWS CloudFormation to deploy infrastructure. The security team requires that all CloudTrail trails be encrypted with a customer-managed KMS key. Which CloudFormation template snippet correctly enforces this requirement?

A.Trail with KMSKeyId set to 'aws/cloudtrail'
B.Trail with KMSKeyId set to 'arn:aws:kms:us-east-1:123456789012:key/abcd1234-...'
C.Trail with KMSKeyId set to 'alias/my-cloudtrail-key'
D.Trail without KMSKeyId specified
AnswerB

This specifies a customer-managed KMS key.

Why this answer

It uses the full ARN of a specific customer-managed KMS key, ensuring the encryption requirement is met. Option C uses an alias, which could point to either an AWS managed key or a customer-managed key, so it does not guarantee compliance. Option A uses the AWS managed key 'aws/cloudtrail', not customer-managed.

Option D omits encryption entirely.

5
MCQmedium

A company uses AWS Organizations with multiple accounts. The security team needs to enforce that all S3 buckets in the organization block public access. Which policy should be attached to the root organizational unit to achieve this?

A.Enable AWS CloudTrail to log public access attempts and alert the security team.
B.Use AWS Config rules to remediate non-compliant buckets automatically.
C.Attach a service control policy (SCP) that denies s3:PutBucketPublicAccessBlock.
D.Create an IAM role with a bucket policy that blocks public access.
AnswerC

SCPs can be attached to OUs to centrally restrict permissions.

Why this answer

Attach a service control policy (SCP) that denies s3:PutBucketPublicAccessBlock. SCPs can be applied at the root organizational unit to centrally restrict permissions across all accounts, preventing any account from allowing public access to S3 buckets. Option A (CloudTrail) only logs events, not block access.

Option B (AWS Config) can detect non-compliance but requires additional automation to enforce; the question asks for enforcement directly. Option D (IAM role) is account-specific and cannot enforce globally.

6
MCQeasy

A company is using AWS Organizations with multiple accounts. The security team wants to ensure that all IAM users in the organization have multi-factor authentication (MFA) enabled. Which combination of actions should be taken to enforce this requirement?

A.Create an SCP that denies IAM actions without MFA and attach it to the IAM group that contains all users.
B.Create an SCP that denies IAM actions without MFA and attach it to the root organizational unit (OU).
C.Create an SCP that denies IAM actions without MFA and attach it to each IAM user.
D.Create an SCP that denies IAM actions without MFA and attach it to the management account.
AnswerB

Attaching the SCP to the root organizational unit places it in the hierarchy of every OU and member account in the organization, so the deny rule with aws:MultiFactorAuthPresent applies to every IAM user in those accounts. Because a root-level SCP is evaluated as an organizational permission boundary before IAM authorization, an IAM action without MFA is blocked throughout the member accounts.

Why this answer

Service Control Policies (SCPs) in AWS Organizations can be attached to the root organizational unit (OU) to apply a blanket denial of IAM actions when MFA is not present, affecting all accounts and users within the organization. This leverages the `aws:MultiFactorAuthPresent` condition key in an SCP to enforce MFA at the organization level, ensuring that even if IAM users are created in member accounts, they cannot perform IAM actions without MFA. Attaching the SCP to the root OU ensures the policy cascades down to all child OUs and accounts, providing centralized enforcement.

Exam trap

The trap here is that candidates mistakenly think SCPs can be attached to IAM users or groups, but SCPs are organization-level policies that only apply to OUs, accounts, or the root, not to individual IAM entities.

How to eliminate wrong answers

Option A is wrong because SCPs cannot be attached to IAM groups; SCPs are applied to OUs, accounts, or the root of the organization, not to IAM entities like groups, users, or roles. Option C is wrong because SCPs cannot be attached directly to IAM users; they are only applicable to AWS Organizations entities (OUs, accounts, or the root). Option D is wrong because attaching the SCP to the management account would only affect that single account, not the member accounts; SCPs must be attached to the root OU or relevant OUs to enforce policies across the entire organization.

7
MCQhard

A security engineer notices that an IAM user has been inactive for 90 days. What is the best way to identify and disable such users?

A.Use CloudTrail to identify users with no recent events
B.Use AWS Config rule to detect inactive users
C.Use IAM Credential Report and disable users with no activity in 90 days
D.Use AWS Organizations to disable users
AnswerC

Credential Report shows last usage.

Why this answer

The IAM Credential Report provides a comprehensive CSV export of all IAM users in the account, including the `password_last_used` and `access_key_last_used_date` columns. This allows a security engineer to directly identify users who have had no activity for 90 days and then disable them by applying an IAM policy with a `Deny` effect or removing their credentials. It is the most straightforward, native, and accurate method for this specific task.

Exam trap

The trap here is that candidates confuse CloudTrail (which logs events) with the IAM Credential Report (which directly reports user activity), or they assume AWS Config can evaluate user inactivity when it is designed for resource configuration compliance, not behavioral monitoring.

How to eliminate wrong answers

Option A is wrong because CloudTrail records API activity but does not natively aggregate or report on user inactivity over a 90-day period; you would need to write custom queries and there is no built-in 'inactive user' view. Option B is wrong because AWS Config rules evaluate resource configurations (e.g., whether an IAM user has a policy attached) but cannot directly detect user login or API activity inactivity; there is no managed Config rule for 'inactive IAM user'. Option D is wrong because AWS Organizations is a service for managing multiple AWS accounts centrally, not for disabling individual IAM users within a single account.

8
MCQeasy

A security engineer needs to automatically detect and respond to unauthorized API calls in an AWS account. Which two services should be used together?

A.AWS CloudTrail and Amazon EventBridge
B.Amazon GuardDuty and Amazon SNS
C.AWS Config and AWS Lambda
D.Amazon Inspector and Amazon S3
AnswerA

CloudTrail logs API calls, EventBridge triggers automated responses.

Why this answer

CloudTrail logs API calls, and Amazon EventBridge can trigger automated responses based on those logs. Option A is correct. Option B (GuardDuty + SNS) provides threat detection alerts but not automated response.

Option C (Config + Lambda) is for configuration compliance, not API call detection. Option D (Inspector + S3) is for vulnerability assessment, not API monitoring.

9
MCQeasy

The exhibit shows an S3 bucket policy. The security team wants to ensure that only users from account 123456789012 can access objects in the bucket. What is a potential security issue with this policy?

A.The policy grants access to all IAM users in the account, not just specific ones.
B.The policy does not restrict access to a specific VPC.
C.The policy uses a wildcard in the resource ARN.
D.The policy does not require MFA.
AnswerA

Using the root ARN grants access to the entire account, not a specific principal.

Why this answer

The policy uses a Principal of "123456789012" which effectively grants access to all IAM users and roles within that AWS account. This means any user in the account who has permission to call s3:GetObject can access the bucket objects, making it overly permissive. The correct answer is A because this is the security issue—no restriction to specific users or roles.

10
MCQhard

A global e-commerce company operates in three AWS Regions: us-east-1, eu-west-1, and ap-southeast-1. The company uses AWS Organizations with 50 member accounts grouped by business unit. The security team recently discovered that several S3 buckets containing customer data were accidentally made public due to misconfigured bucket policies. The team wants to implement a preventive control that blocks any S3 bucket from becoming public across all accounts, while still allowing authorized cross-account access. The solution must be centrally managed and not require changes to existing IAM policies. Additionally, the team needs to be notified immediately when a public bucket is attempted. Which solution meets all requirements?

A.Use Amazon Macie to discover public buckets and alert the security team.
B.Create an SCP that denies s3:PutBucketPolicy only for policies that specify 'Principal': '*' or 'Principal': {'AWS': '*'}
C.Create an SCP that denies s3:PutBucketPolicy and s3:PutBucketAcl when the condition includes making the bucket public, and use CloudTrail and CloudWatch Events to send notifications on denied API calls.
D.Deploy an AWS Config rule in each account that triggers a Lambda function to make non-compliant buckets private.
AnswerC

SCPs are preventive and centrally managed; CloudTrail logs denied events, and CloudWatch Events can trigger SNS for notifications.

Why this answer

It uses an SCP to centrally deny the s3:PutBucketPolicy and s3:PutBucketAcl actions when the request would make a bucket public, which is a preventive control that blocks the operation before it happens. The requirement for immediate notification is met by using CloudTrail to log the denied API calls and CloudWatch Events to trigger alerts, all without modifying existing IAM policies or requiring per-account changes.

Exam trap

The trap here is that candidates often confuse detective controls (like Macie or Config rules that remediate) with preventive controls (like SCPs that block the action), and they may overlook that SCPs can deny specific API actions with conditions to precisely target public bucket creation without affecting authorized cross-account access.

How to eliminate wrong answers

Option A is wrong because Amazon Macie is a data discovery and classification service that can detect public buckets after they exist, but it is a detective control, not a preventive control that blocks the action. Option B is wrong because an SCP that denies s3:PutBucketPolicy only when 'Principal': '*' or 'Principal': {'AWS': '*'} is specified does not cover all ways a bucket can become public, such as through bucket ACLs (s3:PutBucketAcl) or policies that grant public access via other principal patterns (e.g., 'Principal': {'AWS': 'arn:aws:iam::123456789012:root'} with a condition that allows anonymous access). Option D is wrong because an AWS Config rule that triggers a Lambda function to make non-compliant buckets private is a reactive (corrective) control, not a preventive control that blocks the bucket from becoming public in the first place, and it requires per-account deployment rather than being centrally managed.

11
MCQhard

Refer to the exhibit. A security engineer applied the bucket policy shown. What is the effect of this policy?

A.All PutObject requests are denied.
B.Only GetObject requests that use HTTP are denied.
C.Only GetObject requests from specific IP ranges are denied.
D.All GetObject requests to the bucket are denied.
AnswerB

Correct. The policy denies GetObject requests when aws:SecureTransport is false (HTTP).

Why this answer

The bucket policy includes a Deny statement for s3:GetObject requests that are not using HTTPS. The condition `aws:SecureTransport` is set to false, meaning the request is over HTTP. Therefore, any GetObject request made over HTTP is denied.

PutObject requests are not affected, and GetObject requests over HTTPS are allowed regardless of IP address.

Exam trap

The trap here is that candidates overlook the `Null` condition on `aws:SecureTransport` and assume the `NotIpAddress` condition alone denies all requests from outside the IP range, missing that the policy only triggers when the request is over HTTP.

How to eliminate wrong answers

Option A is wrong because the policy only denies `s3:GetObject`, not `s3:PutObject`, so PutObject requests are not denied. Option C is wrong because the policy denies requests from IPs outside the specified range only when the request uses HTTP; it does not deny requests from specific IP ranges—it denies requests not from that range, but only under the HTTP condition. Option D is wrong because the policy does not deny all GetObject requests; it only denies those made over HTTP, leaving HTTPS GetObject requests unaffected.

12
MCQhard

A company has a requirement that all Amazon EC2 instances must be launched with an IAM role that grants least-privilege permissions. The security team wants to prevent users from launching instances without a role, and also want to ensure that the role used is one of a set of approved roles. How can this be enforced?

A.Use an SCP to require that all EC2 instances have an IAM role attached.
B.Attach an IAM policy to users that denies ec2:RunInstances unless the ec2:InstanceProfile condition matches an approved profile ARN.
C.Use an SCP to deny ec2:RunInstances unless the instance profile is in a specific list of ARNs.
D.Use AWS Config to detect instances without a role and automatically terminate them.
AnswerB

This policy condition ensures that only instances with an approved IAM role can be launched.

Why this answer

Option B uses an IAM policy with a condition on the ec2:InstanceProfile key to ensure that only approved instance profiles are used. This satisfies both requirements: a role must be attached, and it must be one of the approved roles.

Option A is incorrect because an SCP that requires an IAM role cannot restrict the role to a specific set of approved roles; it would allow any role.

Option C is incorrect because SCPs require AWS Organizations and apply to all principals in the account. While SCPs can technically use the ec2:InstanceProfile condition key, they are typically used for broad guardrails and not for user-specific restrictions. An IAM policy with a condition is the recommended method for this use case.

Option D is incorrect because AWS Config is a detective service; it cannot prevent unauthorized launches, only detect them after the fact.

13
Multi-Selectmedium

A security engineer needs to ensure that all API calls in an AWS account are logged and that the logs are encrypted at rest and retained for at least 7 years. Which THREE steps should the engineer take? (Choose THREE.)

Select 3 answers
A.Configure CloudTrail to deliver logs to Amazon S3 Glacier.
B.Set an S3 lifecycle policy to transition logs to Glacier after 7 years.
C.Enable S3 Cross-Region Replication to a bucket in another region.
D.Enable S3 default encryption on the log bucket.
E.Enable CloudTrail in the account.
AnswersB, D, E

Retains logs for 7 years.

Why this answer

To ensure all API calls are logged, encrypted at rest, and retained for at least 7 years, the correct steps are: E. Enable CloudTrail in the account to capture API calls; D. Enable S3 default encryption on the log bucket to encrypt logs at rest; and B.

Set an S3 lifecycle policy to transition logs to Glacier after 7 years for long-term retention. Option A is incorrect because CloudTrail cannot deliver logs directly to Glacier; it delivers to an S3 bucket first. Option C is incorrect because Cross-Region Replication helps with geographic redundancy but does not address retention or encryption.

14
MCQmedium

A security team is reviewing IAM roles and policies. They want to ensure that any new IAM role created in the account must include a specific managed policy (e.g., SecurityAudit). What AWS service can enforce this requirement?

A.AWS CloudTrail
B.AWS Config rules
C.Service control policy (SCP) in AWS Organizations
D.IAM permissions boundary
AnswerC

SCPs can deny role creation if required policy is not attached.

Why this answer

AWS CloudTrail logs API calls but does not enforce policies. Option B is incorrect because AWS Config rules can detect noncompliant roles after creation but cannot prevent their creation. Option C is correct because Service Control Policies (SCPs) in AWS Organizations can deny the creation of IAM roles that do not have a specific managed policy attached, using a condition like `aws:RequestedManagedPolicy`.

Option D is incorrect because IAM permissions boundaries limit the maximum permissions a role can have but do not enforce attachment of a specific managed policy.

15
MCQhard

A company has an S3 bucket that contains sensitive data. The bucket policy allows access only from a specific VPC endpoint. A security engineer notices that objects in the bucket are being deleted by an IAM user from outside the VPC. The engineer checks the bucket policy and confirms that the policy denies access if the request does not come from the VPC endpoint. However, the deletions continue. What is the most likely cause?

A.The bucket policy is missing a Deny statement for the s3:DeleteObject action.
B.The VPC endpoint policy allows the deletion.
C.The IAM user is the bucket owner and the bucket policy does not apply to the owner.
D.The bucket has an ACL that allows the IAM user to delete objects.
AnswerC

Bucket policies do not apply to the account that owns the bucket; IAM policies would need to be used.

Why this answer

The bucket owner (the root user of the AWS account that owns the bucket) is not subject to bucket policies. Since the IAM user is the bucket owner (same account), the bucket policy's deny condition does not restrict their actions. Therefore, the IAM user can delete objects from outside the VPC.

Option A is incorrect because the bucket policy does deny s3:DeleteObject for non-VPC requests; the issue is that the policy does not apply to the owner. Option B is incorrect because the VPC endpoint policy only applies to requests coming through the endpoint, and the user is not using the endpoint. Option D is incorrect because ACLs are not relevant here; even if an ACL allowed the deletion, the bucket policy would typically override it, but again, the policy does not apply to the owner.

16
MCQeasy

A company needs to audit all changes to IAM policies in their AWS account. Which AWS service should they use to record these changes?

A.Amazon S3
B.Amazon CloudWatch Logs
C.AWS Config
D.AWS CloudTrail
AnswerD

CloudTrail logs all API calls, including IAM policy modifications.

Why this answer

AWS CloudTrail records API calls, including IAM policy changes. Option D is correct because CloudTrail logs all IAM policy modifications. Option A (Amazon S3) is wrong because S3 is a storage service and does not record API calls.

Option B (Amazon CloudWatch Logs) is wrong because CloudWatch Logs stores logs but does not directly record API calls for audit purposes. Option C (AWS Config) is wrong because AWS Config records resource state changes but not the API calls that caused those changes.

17
MCQhard

A company uses AWS Organizations with a management account and several member accounts. The security team wants to restrict the use of specific AWS services (e.g., EC2, Lambda) in certain accounts based on the account's environment (dev, test, prod). Which approach should be used to implement this requirement?

A.Use AWS CloudTrail to monitor API calls and revoke access after the fact.
B.Create IAM roles in each account with policies that deny access to services.
C.Use AWS Organizations to tag accounts (e.g., Environment=Dev) and use SCPs with conditions to deny access to services based on tags.
D.Use AWS Config rules to detect and alert when restricted services are used.
AnswerC

Tag-based SCPs allow fine-grained control across accounts.

Why this answer

By tagging accounts in AWS Organizations (e.g., Environment=Dev) and using Service Control Policies (SCPs) with conditions based on those tags, the security team can restrict usage of specific AWS services per account environment. SCPs are applied at the organization level and affect all users and roles in the account, providing preventive controls. Option A is incorrect because CloudTrail only logs API calls and does not prevent usage; revoking access after the fact is not a preventive measure.

Option B is incorrect because IAM roles are identity-based and do not restrict services at the account level; also, managing roles per account would be cumbersome. Option D is incorrect because AWS Config rules detect non-compliant resource configurations but do not prevent the use of services; they are detective controls.

18
Multi-Selectmedium

A security engineer is configuring AWS Config to track changes to security groups in a VPC. The engineer wants to be notified when a security group is modified. Which TWO steps are required to achieve this?

Select 2 answers
A.Configure an SNS topic and subscribe to it to receive notifications when the Config rule triggers.
B.Enable AWS CloudTrail to log security group changes.
C.Enable Amazon GuardDuty to detect security group modifications.
D.Create an AWS Config rule that monitors security group changes.
E.Enable VPC Flow Logs to capture security group activity.
AnswersA, D

SNS can send notifications on Config rule compliance changes.

Why this answer

Options A and D are correct. To monitor security group changes with AWS Config, you need to create an AWS Config rule (option D) that tracks changes to security groups. To receive notifications when the rule triggers, you configure an SNS topic and subscribe to it (option A).

Option B is incorrect because AWS CloudTrail logs API calls to security groups, but Config itself monitors resource configuration changes without requiring CloudTrail. Option C is incorrect because Amazon GuardDuty is a threat detection service, not a configuration change monitor. Option E is incorrect because VPC Flow Logs capture network traffic, not configuration changes.

The common pitfall is assuming CloudTrail or GuardDuty is necessary, but Config's built-in change tracking suffices.

19
MCQmedium

A security engineer discovers that an IAM user has a policy that allows them to delete any S3 bucket in the account. The engineer wants to audit all delete actions performed by this user. Which AWS service should be used?

A.Amazon GuardDuty
B.AWS Config
C.AWS CloudTrail
D.Amazon CloudWatch Logs
AnswerC

CloudTrail records API calls for auditing.

Why this answer

AWS CloudTrail logs all API calls made to the AWS API, including S3 bucket deletions, and is the appropriate service for auditing user actions. Option C (CloudTrail) is correct. Option A (GuardDuty) is a threat detection service that monitors for malicious activity but does not log all API calls.

Option B (AWS Config) evaluates resource configurations and changes but does not log API calls. Option D (CloudWatch Logs) stores logs from various sources but does not capture API calls by default.

20
Multi-Selecthard

A security engineer is designing a solution to automatically remediate noncompliant EC2 security groups. The company uses AWS Organizations with multiple accounts. The engineer wants to deploy an AWS Config rule and a custom Lambda function in a central security account to evaluate and remediate security groups across all accounts. Which combination of steps is REQUIRED to allow the Lambda function to modify security groups in member accounts? (Choose TWO.)

Select 2 answers
A.Create an IAM role in each member account that allows the central security account to assume it.
B.Use AWS CloudFormation StackSets to deploy the Lambda function to all member accounts.
C.Configure an AWS Config remediation action that invokes the Lambda function in the central account.
D.Attach a resource-based policy to the Lambda function granting access to Config from all member accounts.
E.Create the Lambda function in each member account and configure Config rules in each account.
AnswersA, C

This enables cross-account access for the Lambda function to modify security groups.

Why this answer

The correct approach is to use AWS Config aggregated rules with remediation actions that invoke Lambda cross-account. Option A is required to allow the central account to assume a role in member accounts; Option C is required to invoke the Lambda function from Config. Option B (same account) is not cross-account.

Option D is not required because Config aggregates can work with individual accounts. Option E is redundant.

21
Multi-Selecthard

A security engineer is designing a solution to detect and alert on any S3 bucket that is publicly accessible. Which THREE services can be used together to achieve this?

Select 3 answers
A.AWS Security Hub
B.Amazon S3 Block Public Access settings
C.AWS Config
D.AWS CloudTrail
E.Amazon VPC Flow Logs
AnswersA, C, D

Aggregates findings from Config and other services.

Why this answer

(AWS Security Hub) is correct because it can aggregate findings from other services like AWS Config and Amazon GuardDuty, providing a centralized view and alerting for S3 bucket public access issues. Option C (AWS Config) is correct because it can evaluate S3 bucket policies against a managed rule (e.g., s3-bucket-public-read-prohibited) to detect public access and trigger alerts. Option D (AWS CloudTrail) is correct because it logs S3 API calls such as PutBucketPolicy, and you can create CloudWatch Events or metric filters to alert on changes that grant public access.

Option B (Amazon S3 Block Public Access) is incorrect; it is a preventive control that blocks public access but does not detect or alert on existing public buckets. Option E (Amazon VPC Flow Logs) is incorrect because it captures network traffic data, not S3 bucket policy changes.

22
MCQmedium

A company uses AWS Key Management Service (KMS) to encrypt data. The security team needs to ensure that KMS keys cannot be deleted accidentally. Which action should be taken?

A.Apply an SCP that denies kms:ScheduleKeyDeletion for all accounts.
B.Create an IAM policy that denies kms:ScheduleKeyDeletion for the key.
C.Enable automatic key rotation.
D.Enable deletion protection on the key.
AnswerB

This prevents authorized users from scheduling key deletion.

Why this answer

To prevent accidental deletion of KMS keys, you must deny the kms:ScheduleKeyDeletion permission. An IAM policy attached to the key (key policy) or to the user/role can explicitly deny this action. Option B is correct because it directly denies the permission needed to schedule deletion.

Option A (SCP denying kms:ScheduleKeyDeletion) can be used at the organizational level but is not the most direct per-key control. Option C (automatic key rotation) does not prevent deletion. Option D is invalid because KMS does not have a deletion protection toggle; protection is achieved through IAM/key policies.

23
MCQmedium

A security engineer is reviewing an IAM policy attached to a user. The policy is intended to allow the user to read objects from an S3 bucket only from the office IP range 192.0.2.0/24. However, the user reports that they can access objects from any IP address. What is the most likely reason?

A.The policy does not include an explicit Deny for requests outside the IP range.
B.The condition key is misspelled; it should be aws:SourceIp without the 's'.
C.The policy is attached to the user, but the bucket has a bucket policy that allows public access.
D.The resource ARN is missing the bucket name.
AnswerA

Without explicit Deny, other policies may allow access.

Why this answer

IAM policies do not have an explicit Deny by default; the Allow with condition only grants access from the specified IP range. However, other policies (like a bucket policy or another IAM policy) could grant access from other IPs, overriding the condition. To prevent access from outside the IP range, an explicit Deny for all other IPs is required.

Option B is incorrect because the condition key 'aws:SourceIp' is correctly spelled; it uses a capital 'S' and 'I'. Option C is incorrect because while a bucket policy allowing public access could override, the most likely reason in this scenario is that the IAM policy is missing an explicit Deny, as that is a common misconfiguration. Option D is incorrect because if the resource ARN is missing the bucket name, the policy would not apply to the bucket at all, and the user would not have access, contradicting the ability to access from any IP.

24
Multi-Selectmedium

A company is implementing a data retention policy for CloudTrail logs. The logs are stored in an S3 bucket. The policy requires that logs be retained for 7 years and then automatically deleted. Which TWO actions should the security engineer take to meet this requirement?

Select 2 answers
A.Use AWS Backup to manage retention and deletion.
B.Enable S3 Object Lock in compliance mode on the bucket.
C.Configure the S3 bucket policy to deny s3:DeleteObject actions for all principals.
D.Enable S3 Versioning and create a lifecycle policy to delete noncurrent versions.
E.Create an S3 Lifecycle policy that expires objects after 2555 days (7 years).
AnswersB, E

Correct. Enabling S3 Object Lock in compliance mode prevents any deletion of objects during the retention period, ensuring logs are retained for 7 years.

Why this answer

To retain logs for 7 years and then automatically delete, the security engineer should enable S3 Object Lock in compliance mode (B) to prevent any deletion during the retention period, and create an S3 Lifecycle policy to expire objects after 2555 days (E). The Object Lock ensures logs cannot be deleted prematurely, while the lifecycle policy handles automatic deletion after 7 years. Option C is incorrect because denying s3:DeleteObject to all principals would block the lifecycle policy from deleting objects.

Options A and D are not suitable for this requirement.

25
Multi-Selecthard

A company has a security policy that requires all IAM users to use multi-factor authentication (MFA) when accessing the AWS Management Console. The company also wants to enforce this policy using an SCP. Which TWO conditions must be met for the SCP to be effective?

Select 2 answers
A.The SCP must use a condition that checks if MFA is present.
B.The SCP must use the condition key 'aws:SourceIp' to allow only MFA-enabled IPs.
C.The SCP must require users to register MFA devices before accessing the console.
D.The SCP must be attached to the root organizational unit to apply to all accounts.
E.The SCP must be attached to individual IAM users.
AnswersA, D

The SCP uses aws:MultiFactorAuthPresent to check MFA status.

Why this answer

Options A and D are correct. The SCP must use a condition key such as `aws:MultiFactorAuthPresent` to deny access if the user has not authenticated with MFA (A), and it must be attached to the root organizational unit to apply to all accounts in the organization (D). Option B is incorrect because `aws:SourceIp` is for IP-based restrictions, not MFA.

Option C is incorrect because SCPs cannot require MFA registration; they can only enforce conditional access. Option E is incorrect because SCPs are attached to organizational units, not individual IAM users.

26
Multi-Selectmedium

A security engineer is implementing a data classification policy for an S3 bucket that contains sensitive customer data. The policy requires that all objects be encrypted at rest using AWS KMS and that any attempt to upload an unencrypted object be denied. Which THREE steps should the engineer take to enforce this policy? (Choose THREE.)

Select 3 answers
A.Enable S3 bucket keys to reduce KMS API calls.
B.Create a customer managed KMS key.
C.Enable bucket policy to enforce SSL (aws:SecureTransport).
D.Add a bucket policy that denies PutObject if s3:x-amz-server-side-encryption is not aws:kms.
E.Enable S3 default encryption with the KMS key.
AnswersB, D, E

Provides encryption key for S3.

Why this answer

To enforce encryption at rest using AWS KMS for all objects uploaded to an S3 bucket, the security engineer should:

Create a customer managed KMS key (option B) to have full control over the key, including rotation, access policies, and auditing.

Add a bucket policy that denies PutObject if the `s3:x-amz-server-side-encryption` header is not set to `aws:kms` (option D). This ensures any upload without KMS encryption is denied.

Enable S3 default encryption with the KMS key (option E) to automatically encrypt objects even if the upload request does not include encryption headers.

Option A (enabling bucket keys) is wrong because it reduces KMS API calls for already KMS-encrypted objects, but does not enforce encryption. Option C (enforcing SSL) addresses encryption in transit, not at rest, and thus does not meet the policy requirement.

Exam trap

A common trap is to confuse encryption in transit (SSL/TLS) with encryption at rest. The question explicitly asks about encryption at rest, so options related to SecureTransport are irrelevant.

27
MCQmedium

A company uses AWS Organizations with multiple accounts. The security team wants to prevent all users in the production account from disabling AWS CloudTrail or modifying its configuration. What is the MOST effective way to achieve this?

A.Use IAM policies to deny only cloudtrail:DeleteTrail for all users.
B.Enable CloudTrail log file validation and use AWS Config to detect changes.
C.Create an SCP in AWS Organizations that denies cloudtrail:StopLogging, cloudtrail:DeleteTrail, cloudtrail:UpdateTrail, and similar actions.
D.Attach an IAM permissions boundary to all IAM roles in the production account that denies CloudTrail modifications.
AnswerC

An SCP applied to the production account can deny specific CloudTrail actions across all principals, including the root user, providing effective prevention.

Why this answer

An SCP applied to the production account can deny specific CloudTrail actions across all principals in the account, including the root user. Option A is insufficient because denying only cloudtrail:DeleteTrail still allows other modifications like cloudtrail:StopLogging or cloudtrail:UpdateTrail. Option B is detective, not preventive, and does not stop users from making changes.

Option D, IAM permissions boundaries, are attached to IAM entities but do not apply to all users (e.g., the root user) and can be overridden by an explicit allow; SCPs provide stronger account-wide enforcement.

28
MCQmedium

A company uses AWS Organizations with multiple accounts. The security team wants to ensure that all newly created accounts automatically have AWS CloudTrail enabled, with logs delivered to a centralized S3 bucket. Which solution meets these requirements with the least operational overhead?

A.Create an SCP that enables CloudTrail and enforces log delivery to the centralized S3 bucket.
B.Use AWS Trusted Advisor to check CloudTrail status and send alerts to the security team.
C.Create an SCP that denies actions to disable CloudTrail and modify the S3 bucket policy. Use AWS CloudFormation StackSets to deploy a CloudTrail trail in each account.
D.Use AWS Config rules with auto-remediation to enable CloudTrail in each account.
AnswerC

Correct: StackSets automate deployment of CloudTrail across accounts, and SCP prevents disabling.

Why this answer

The correct answer. SCPs cannot enable CloudTrail, but they can prevent disabling it and modifying the S3 bucket policy. To actually enable CloudTrail across all accounts with minimal overhead, AWS CloudFormation StackSets can deploy a CloudTrail trail in each account automatically.

Option A is incorrect because SCPs cannot enable services—they only deny or allow actions. Option B is incorrect because AWS Trusted Advisor only checks and alerts; it does not enforce configurations. Option D is incorrect because AWS Config rules with auto-remediation can work but involve more setup and overhead compared to using StackSets, which is purpose-built for deploying resources across multiple accounts.

Therefore, C provides the least operational overhead.

29
MCQmedium

A company wants to enforce that all IAM users in its AWS account use multi-factor authentication (MFA) for console login. Which action should be taken to ensure compliance?

A.Apply an SCP to the AWS account that mandates MFA for all users.
B.Create an IAM policy that denies access unless MFA is present and attach it to all IAM users.
C.Enable MFA on the root user and share credentials with all users.
D.Configure the account password policy to require MFA.
AnswerB

Correct: IAM policies can use conditions to require MFA for access.

Why this answer

The correct action is to create an IAM policy that denies access unless MFA is present and attach it to all IAM users. This policy uses a condition key like 'aws:MultiFactorAuthPresent' to block API calls when MFA is not used, effectively enforcing MFA for console login. Option A is incorrect because service control policies (SCPs) apply at the AWS Organizations level, not to individual IAM users, and cannot enforce MFA on console login.

Option C is wrong because sharing root user credentials violates security best practices and does not enforce MFA for each user. Option D is incorrect because AWS account password policies do not include an MFA requirement; they only manage password complexity and rotation.

30
MCQeasy

A company wants to grant a third-party auditor read-only access to specific CloudTrail log files stored in an S3 bucket. The auditor should not be able to list or access any other objects in the bucket. What is the most secure way to achieve this?

A.Use CloudTrail's built-in console access for the auditor.
B.Create a new IAM user for the auditor with an S3 policy that grants s3:GetObject on the entire bucket.
C.Generate pre-signed URLs for the specific log files and share them with the auditor.
D.Use a bucket policy that grants the auditor's IAM user s3:GetObject access to the specific log file prefix.
AnswerC

Pre-signed URLs provide time-limited access to specific objects without requiring AWS credentials.

Why this answer

Using S3 pre-signed URLs grants time-limited access to specific objects without requiring the auditor to have AWS credentials. Option A is wrong because CloudTrail does not provide built-in console access for auditors. Option B is wrong because granting s3:GetObject on the entire bucket would allow access to all objects, not just specific log files.

Option D is wrong because a bucket policy granting s3:GetObject to a specific prefix still requires the auditor to have AWS credentials, and the policy must explicitly deny s3:ListBucket to prevent listing; even then, managing credentials for a third party is less secure than using pre-signed URLs.

31
Multi-Selecthard

A company has an AWS Organization with hundreds of accounts. The security team wants to enforce that no account can disable AWS CloudTrail logging. Which TWO approaches can achieve this?

Select 2 answers
A.Enable CloudTrail as a trusted service and create an organization trail.
B.Apply an IAM policy to each account's root user to prevent disabling CloudTrail.
C.Create an SCP that denies cloudtrail:StopLogging and cloudtrail:DeleteTrail.
D.Use AWS Config to automatically re-enable CloudTrail if it is disabled.
E.Configure CloudWatch Logs to monitor CloudTrail logs and alert if logging stops.
AnswersA, C

Organization trails cannot be stopped or deleted by member accounts.

Why this answer

Options A and C are correct. An SCP can deny the cloudtrail:StopLogging and cloudtrail:DeleteTrail actions (C), and enabling CloudTrail as a trusted service with an organization trail (A) prevents individual accounts from stopping or modifying the trail. Option B is wrong because IAM policies are account-specific and cannot be enforced across all accounts.

Option D is wrong because AWS Config can detect and remediate, but cannot prevent the initial disabling. Option E is wrong because CloudWatch Logs alerts do not prevent disabling CloudTrail.

32
MCQhard

An organization has a requirement to retain all AWS CloudTrail logs for at least 7 years for compliance. Currently, logs are stored in an S3 bucket with default settings. What is the MOST cost-effective way to meet the retention requirement?

A.Use S3 Glacier Deep Archive immediately.
B.Set an S3 lifecycle policy to delete objects after 7 years.
C.Set the CloudTrail trail to store logs in an S3 bucket with 7-year retention.
D.Configure S3 lifecycle policy to transition objects to S3 Glacier after 30 days and expire after 7 years.
AnswerD

Transitioning to Glacier reduces cost while meeting retention.

Why this answer

The most cost-effective because it uses an S3 lifecycle policy to transition objects to S3 Glacier after 30 days (reducing storage costs for older logs) and then expires (deletes) them after 7 years to meet the retention requirement. Option A is wrong because storing logs directly in S3 Glacier Deep Archive is not cost-effective for logs that may be accessed occasionally and does not automatically expire after 7 years without additional policy. Option B is wrong because simply deleting after 7 years does not take advantage of cheaper storage tiers.

Option C is wrong because CloudTrail trails do not have a retention setting; retention must be managed via S3 lifecycle policies.

33
MCQhard

A company uses AWS Organizations to manage 50 accounts. The security team has enabled AWS CloudTrail in the management account with an organization trail that delivers logs to a central S3 bucket. The bucket policy grants necessary permissions to CloudTrail. Recently, the security team noticed that logs from two member accounts stopped appearing in the bucket. Other accounts continue to deliver logs correctly. The CloudTrail status in the management account shows that the trail is logging and deliveries are succeeding. The security team checked the CloudTrail configuration in the affected member accounts and found that they do not have any trails configured. The IAM roles used for CloudTrail in the management account have sufficient permissions. What is the most likely cause of the missing logs?

A.The KMS key used for encryption does not include permissions for the member accounts.
B.The S3 bucket policy does not grant write access to the CloudTrail service for the affected member accounts.
C.The CloudTrail service-linked role in the member accounts is missing.
D.An SCP attached to the affected member accounts denies cloudtrail:PutLogEvents.
AnswerB

Correct: Bucket policy must allow CloudTrail from all accounts.

Why this answer

The most likely cause is that the S3 bucket policy does not grant write access to the CloudTrail service for the affected member accounts. When an organization trail is created, CloudTrail uses the management account's permissions to deliver logs to the S3 bucket. However, the bucket policy must explicitly allow the CloudTrail service principal from each member account to write logs.

If the policy only allows the management account, member accounts' logs will be rejected. Option A is incorrect because the issue is not about KMS key permissions; if SSE-KMS is used, the key policy must also grant decrypt permissions to CloudTrail, but the question does not mention KMS. Option C is incorrect because CloudTrail does not use a service-linked role for organization trails; it uses the CloudTrail service role in the management account.

Option D is incorrect because an SCP denying cloudtrail:PutLogEvents would affect all CloudTrail actions, but the logs from other accounts are still arriving, so it is unlikely.

34
MCQmedium

A company uses AWS Organizations to manage multiple accounts. The security team wants to ensure that all accounts have AWS CloudTrail enabled and that logs are delivered to a central S3 bucket in the management account. What is the most efficient way to enforce this across all accounts?

A.Create a service control policy (SCP) that denies modifications to CloudTrail settings.
B.Use AWS Trusted Advisor to check CloudTrail status and send alerts.
C.Configure each account individually with a CloudTrail trail pointing to the central bucket.
D.Use AWS Config rules in each account to detect non-compliant trails.
AnswerA

SCPs can prevent disabling CloudTrail or altering trail configurations across all accounts.

Why this answer

The most efficient way to enforce CloudTrail across all accounts in an AWS Organization is to use a Service Control Policy (SCP) that denies the ability to stop or modify CloudTrail settings. SCPs are applied at the organization level and affect all member accounts, preventing any user or role from disabling CloudTrail or changing trail configuration, regardless of their IAM permissions. This ensures compliance without needing per-account setup.

Option B (Trusted Advisor) only provides alerts, not enforcement. Option C requires manual configuration per account, which is inefficient and error-prone. Option D (AWS Config rules) can detect non-compliance but cannot prevent changes from being made.

35
MCQmedium

A security engineer notices that an S3 bucket contains objects that are accessible to authenticated users from other AWS accounts. The bucket policy allows access to the 'aws:SourceArn' condition that references an Amazon Resource Name (ARN) from another account. What is the MOST effective way to restrict access to only users from the company's own account?

A.Apply an SCP to deny s3:GetObject for any principal outside the organization.
B.Remove the bucket policy and add an IAM policy to the company's users.
C.Modify the condition to use 'aws:SourceArn' with an ARN from the company's account.
D.Add a condition using 'aws:SourceAccount' with the company's account ID.
AnswerD

Restricts access to requests originating from the specified account.

Why this answer

Using the 'aws:SourceAccount' condition key with the company's account ID ensures that only requests originating from that account are allowed, effectively blocking cross-account access from other accounts. Option A is incorrect because SCPs apply to principals within the organization and cannot restrict access from external accounts ('aws:SourceAccount' is not evaluated for SCPs). Option B is incorrect because simply removing the bucket policy would break all cross-account access but also removes any existing policy-based permissions within the account; adding IAM policies alone does not grant cross-account access and may not be the most effective solution.

Option C is incorrect because 'aws:SourceArn' is typically used for service-to-service access (e.g., SNS to S3) and does not reliably restrict by account; the proper condition key for account-level restriction is 'aws:SourceAccount'.

36
MCQmedium

A security engineer notices that an IAM user has permissions to launch EC2 instances but the engineer wants to ensure that all new instances are automatically tagged with the creator's user name. What is the most efficient way to enforce this?

A.Use AWS CloudTrail to monitor and alert on untagged instances.
B.Add an IAM policy to the user that uses a condition key 'aws:RequestTag/Creator' with a value '${aws:username}'.
C.Use AWS Config rules to automatically tag resources after creation.
D.Create an SCP that denies EC2:RunInstances unless the request includes a 'Creator' tag with the user name.
AnswerB

This condition forces the user to include the tag with their username.

Why this answer

Using an IAM policy with a condition key 'aws:RequestTag/Creator' set to '${aws:username}' ensures that any EC2 RunInstances request must include the tag 'Creator' with the IAM user's name, otherwise the request is denied. This enforces tagging at the time of instance creation. Option A (CloudTrail) only provides auditing, not enforcement.

Option C (AWS Config rules) can detect and remediate after creation but is less efficient than proactive enforcement. Option D (SCP) can deny based on missing tags but cannot enforce the tag value to match the user name; also, SCPs are used for account-wide policies, not per-user.

37
MCQmedium

A company has an S3 bucket that stores sensitive data. The bucket policy allows access only from a specific VPC endpoint. The security engineer tests the configuration and finds that requests from the VPC endpoint are being denied. The bucket policy contains the following condition: "Condition": { "StringEquals": { "aws:SourceVpce": "vpce-12345678" } }. The VPC endpoint ID is correct. The engineer also confirms that the VPC endpoint policy allows the necessary S3 actions. What is the most likely reason for the denial?

A.The request is not being routed through the VPC endpoint; the EC2 instance is using a public S3 endpoint.
B.The EC2 instance does not have an IAM role that allows s3:GetObject.
C.The VPC endpoint is in a different region than the S3 bucket.
D.The condition key is misspelled; it should be aws:SourceVpce (no 'e' at the end).
AnswerA

If not using endpoint, the condition key is not present.

Why this answer

The bucket policy condition aws:SourceVpce only appears in requests that are routed through the specified VPC endpoint. If the EC2 instance accesses S3 via the public internet (using the public S3 endpoint), the request does not include the condition key, and the condition fails, causing denial. Option A correctly identifies this misrouting.

Options B, C, and D are not the primary cause: IAM roles are not the issue here because the bucket policy is denying based on the condition; cross-region access is allowed via endpoints; and the condition key is correctly spelled.

38
Matchingmedium

Match each AWS VPC flow log type to its description.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Capture IP traffic for a VPC

Capture IP traffic for a subnet

Capture IP traffic for a network interface

Capture IP traffic for a transit gateway

Why these pairings

AWS VPC flow logs can be created at three levels: VPC (captures traffic for all interfaces in the VPC), subnet (captures traffic for interfaces in a specific subnet), and ENI (captures traffic for a single elastic network interface). Common confusions include mistaking the scope of each log type.

39
MCQmedium

A security engineer needs to ensure that all EC2 instances launched in an account have a specific tag (e.g., CostCenter) applied. If an instance is launched without the tag, it should be automatically terminated. Which solution meets these requirements with minimal effort?

A.Use an SCP to deny ec2:RunInstances if the request does not include the required tag.
B.Use AWS Organizations Tag Policies to enforce the tag.
C.Use AWS Config rules with an automatic remediation action that invokes a Lambda function to terminate the instance.
D.Use AWS CloudTrail to detect RunInstances events and send alerts to the security team.
AnswerC

Config can detect untagged instances and auto-remediate by terminating them.

Why this answer

AWS Config rules can detect EC2 instances that are missing the required tag and trigger an automatic remediation action via a Lambda function to terminate them, providing a fully automated solution with minimal effort. Option A is wrong because SCPs cannot enforce tagging on individual EC2 instances at launch time; they can only deny actions based on conditions, but tagging conditions are not supported for ec2:RunInstances. Option B is wrong because AWS Organizations Tag Policies enforce tagging on resources but do not automatically remediate non-compliant resources; they only prevent creation of resources without tags if applied at the service level, which is not the case here.

Option D is wrong because CloudTrail logs events but cannot automatically terminate instances; it would require manual intervention or additional automation.

40
Multi-Selectmedium

A security engineer is auditing IAM policies. The engineer wants to identify if any policy grants 'Effect: Allow' with 'Action: *' and 'Resource: *'. Which TWO AWS services can be used to detect such overly permissive policies?

Select 2 answers
A.AWS CloudTrail
B.AWS Trusted Advisor
C.AWS Config
D.IAM Access Analyzer
E.Amazon GuardDuty
AnswersC, D

AWS Config can evaluate custom rules to check for overly permissive policies.

Why this answer

IAM Access Analyzer can analyze policies for broad permissions. AWS Config can evaluate custom rules to check for such policies. Option A (CloudTrail) logs usage, not policy content.

Option B (Trusted Advisor) checks some but not all policies. Option E (GuardDuty) does not analyze IAM policies.

41
Multi-Selecthard

Which THREE AWS services can be used to centrally manage security across multiple accounts? (Select THREE.)

Select 3 answers
A.AWS Config
B.AWS Shield
C.AWS CloudTrail
D.Amazon GuardDuty
E.AWS Organizations
AnswersA, C, E

Config can aggregate rules and compliance across accounts.

Why this answer

AWS Config is correct because it provides a centralized view of resource configurations and compliance across multiple accounts when integrated with AWS Organizations. By enabling Config in the management account and using aggregation authorizations, you can aggregate configuration and compliance data from all member accounts into a single administrator account, enabling centralized security governance.

Exam trap

The trap here is that candidates confuse services that aggregate findings (like GuardDuty with Organizations) with services that centrally manage security policies and configurations, leading them to select GuardDuty instead of recognizing that only AWS Config, AWS CloudTrail (for centralized logging), and AWS Organizations (for policy-based governance) provide true centralized management.

42
MCQmedium

A company wants to automatically detect and notify about any S3 buckets that have public read access. Which combination of services should be used?

A.AWS CloudTrail and AWS Lambda
B.AWS Config and Amazon EventBridge
C.AWS IAM Access Analyzer and Amazon CloudWatch
D.AWS Trusted Advisor and Amazon SES
AnswerB

Config evaluates and sends events to EventBridge, which can trigger SNS.

Why this answer

AWS Config can evaluate S3 bucket public access using managed rules, and Amazon EventBridge can trigger notifications via SNS.

43
MCQhard

A company's security team needs to implement a solution to detect and alert on the creation of IAM users or roles with administrative privileges. The solution must be able to analyze historical account activity and provide real-time alerts. Which combination of AWS services should be used?

A.AWS CloudTrail and Amazon CloudWatch Logs with metric filters and alarms
B.Amazon GuardDuty and AWS Lambda
C.AWS Trusted Advisor and Amazon SES
D.AWS Config with managed rules and Amazon SNS
AnswerA

AWS CloudTrail records IAM API calls for user/role creation and policy attachment. CloudWatch Logs metric filters on these events can trigger CloudWatch Alarms for real-time alerts. CloudTrail also retains historical logs for analysis. This combination meets the requirements.

Why this answer

AWS CloudTrail logs IAM CreateUser, CreateRole, and AttachRolePolicy events. Amazon CloudWatch Logs can use metric filters to capture these events and trigger CloudWatch Alarms for real-time alerts. CloudTrail also stores historical logs for analysis.

Option A is the correct combination. Option B (GuardDuty and Lambda) is focused on threat detection, not specific IAM administrative privilege creation events. Option C (Trusted Advisor and SES) provides best-practice recommendations and email notifications, not real-time API monitoring.

Option D (AWS Config and SNS) evaluates resource configuration compliance but does not monitor API calls in real time.

44
MCQmedium

A company uses AWS Organizations with multiple accounts and wants to ensure that all newly created S3 buckets have encryption enabled. The Security team needs a solution that automatically remediates non-compliant buckets without manual intervention. What should they do?

A.Apply a service control policy (SCP) that denies the s3:PutBucketPublicAccessBlock and s3:PutBucketEncryption actions unless the bucket has encryption enabled.
B.Use an S3 bucket policy that denies PutObject unless the request includes the x-amz-server-side-encryption header.
C.Enable AWS Config with the s3-bucket-server-side-encryption-enabled rule and set up automatic remediation using Systems Manager Automation.
D.Create an IAM role with permissions to enforce encryption and attach it to all accounts in the organization.
AnswerC

AWS Config's managed rule s3-bucket-server-side-encryption-enabled continuously evaluates each bucket and flags any bucket whose default encryption setting is disabled. When non-compliance is detected, the rule can trigger an SSM Automation remediation—typically the AWS-EnableS3BucketEncryption document—which automatically applies the appropriate SSE-S3 or SSE-KMS default encryption to the bucket. This pairing of continuous detection and automated remediation provides an enforceable, organization-wide corrective control that directly satisfies the encryption requirement.

Why this answer

AWS Config can continuously evaluate S3 buckets against the s3-bucket-server-side-encryption-enabled rule and automatically remediate non-compliant buckets using Systems Manager Automation, requiring no manual intervention. Option A is incorrect because a service control policy (SCP) cannot enforce encryption on bucket creation; the described SCP is circular and unenforceable since it denies s3:PutBucketEncryption unless encryption is already enabled, which is impossible to satisfy at creation time.

Exam trap

Candidates often think SCPs can enforce encryption on resource creation, but SCPs only control API permissions, not resource configuration. The correct approach is reactive remediation via AWS Config and automation, not proactive denial through SCPs.

How to eliminate wrong answers

Option B is wrong because an S3 bucket policy that denies PutObject unless the x-amz-server-side-encryption header is present only enforces encryption on objects uploaded to existing buckets, not on the bucket creation itself, and does not prevent creation of unencrypted buckets. Option C is wrong because AWS Config with the s3-bucket-server-side-encryption-enabled rule can detect non-compliant buckets, but automatic remediation using Systems Manager Automation requires manual setup and may not prevent creation in real time; it is reactive rather than proactive. Option D is wrong because creating an IAM role with permissions to enforce encryption and attaching it to all accounts does not automatically enforce encryption on new buckets; it only provides the capability, and users could still create buckets without encryption if they have other permissions.

45
Multi-Selectmedium

Which TWO actions are valid ways to enforce the principle of least privilege in an AWS environment?

Select 2 answers
A.Use the root user for daily administration
B.Use S3 bucket policies to allow all IAM users
C.Grant only the necessary actions in IAM policies
D.Use SCPs to deny actions that are not required
E.Assign the AdministratorAccess managed policy to all users
AnswersC, D

This directly applies least privilege.

Why this answer

Options C and D are correct. Option C is correct because IAM policies should grant only the necessary actions, adhering to least privilege. Option D is correct because SCPs can deny actions that are not required across accounts, enforcing least privilege at the organization level.

Option A is wrong because using the root user for daily administration grants unrestricted access, violating least privilege. Option B is wrong because S3 bucket policies that allow all IAM users do not restrict permissions per user. Option E is wrong because assigning the AdministratorAccess managed policy grants full access, contradicting least privilege.

46
MCQhard

A company's security team is implementing a solution to automatically revoke public access to Amazon S3 buckets that become public. The solution must be serverless and use native AWS services. Which combination of services should be used?

A.Amazon S3 event notifications on ObjectCreated events to invoke a Lambda function
B.Amazon EventBridge (CloudWatch Events) to detect PutBucketPolicy events and invoke an AWS Lambda function to remove the policy
C.Amazon CloudWatch Logs with a metric filter and alarm to trigger an SNS notification
D.AWS Config with managed rule 's3-bucket-public-read-prohibited' and auto-remediation via Systems Manager
AnswerB

EventBridge captures API calls from CloudTrail and triggers Lambda to revert the public policy.

Why this answer

Amazon EventBridge (option B) can detect S3 bucket policy changes via CloudTrail (e.g., PutBucketPolicy events) and invoke an AWS Lambda function to remove the public policy, providing automatic remediation. Option A is incorrect because S3 event notifications on ObjectCreated only respond to object-level events, not bucket policy changes. Option C is incorrect because CloudWatch Logs with a metric filter and alarm can only send notifications, not directly remediate the bucket policy.

Option D is incorrect because while AWS Config can detect non-compliant buckets with the managed rule 's3-bucket-public-read-prohibited', automatic remediation typically requires a custom Lambda function or Systems Manager Automation, and the option specifies Systems Manager, which is not as serverless-native as using Lambda directly; moreover, the combination described does not automatically revoke access without additional components.

47
MCQmedium

The exhibit shows an SCP attached to an organizational unit. What is the effect of this policy?

A.It allows s3:PutBucketPolicy only if the bucket ACL is set to bucket-owner-full-control.
B.It denies all s3:PutBucketPolicy actions on all buckets.
C.It denies s3:PutBucketPolicy for any bucket that does not have an ACL.
D.It allows s3:PutBucketPolicy for buckets owned by the management account.
AnswerA

The Deny is conditional; if the condition is not met (i.e., ACL is correct), the action is allowed.

Why this answer

The SCP denies s3:PutBucketPolicy only when the bucket ACL is not set to 'bucket-owner-full-control'. If the ACL is set to that value, the action is allowed. Thus, it ensures that when a bucket policy is created, the ACL must grant full control to the bucket owner.

It does not deny all PutBucketPolicy actions.

Ready to test yourself?

Try a timed practice session using only Security Governance questions.