Courseiva
Security and Compliance →hardMultiple Choice

SOA-C02 Security and Compliance Practice Question

A company's security policy requires that all Amazon S3 buckets must be encrypted at rest with AWS Key Management Service (AWS KMS) customer managed keys. A SysOps administrator discovers that some buckets are not encrypted. Which combination of AWS services should be used to automatically detect and remediate non-compliant buckets using infrastructure as code?

⚠ Common exam trap

Many exam-takers confuse detection services (like GuardDuty or Macie) with compliance evaluation services (AWS Config), or assume that CloudFormation alone can detect non-compliance without a continuous evaluation mechanism like AWS Config rules.

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

✓

AWS Config with a managed rule and AWS Lambda for automatic remediation.

AWS Config with a managed rule (e.g., s3-bucket-server-side-encryption-enabled) can continuously evaluate S3 buckets for compliance with the encryption policy. When a non-compliant bucket is detected, AWS Config can automatically invoke an AWS Lambda function to remediate the issue, such as enabling encryption with a customer managed KMS key. This combination provides automated detection and remediation using infrastructure as code, as the Config rule and Lambda function can be defined in AWS CloudFormation or similar IaC tools.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    AWS Config with a managed rule and AWS Lambda for automatic remediation.

    Why this is correct

    AWS Config is the correct service because it performs continuous, resource-level compliance evaluation. The managed rule 's3-bucket-server-side-encryption-enabled' can be configured with a parameter to require SSE-KMS (aws:kms) rather than just SSE-S3, and when a bucket is non-compliant, AWS Config triggers an automatic remediation action that invokes a Lambda function to apply the required default encryption settings. This creates an end-to-end detect-and-fix pipeline, which CloudTrail, GuardDuty, Inspector, or Macie cannot provide.

  • ✗

    AWS CloudTrail and Amazon GuardDuty.

    Why it's wrong here

    AWS CloudTrail records API calls for auditing and governance, while GuardDuty analyzes VPC flow logs, DNS queries, and CloudTrail events to identify malicious activity. Neither service inspects the current encryption configuration of S3 buckets, so they cannot determine whether a bucket uses SSE-KMS, and neither has a built-in mechanism to remediate a non-compliant bucket automatically. They are investigative/security monitoring tools, not configuration-compliance or remediation services.

  • ✗

    Amazon Inspector and AWS Systems Manager.

    Why it's wrong here

    Amazon Inspector is a vulnerability management service that scans EC2 instances and container images for software vulnerabilities, not S3 bucket settings. AWS Systems Manager provides operational visibility and controls for hybrid/EC2 fleets, such as Patch Manager, Run Command, and Parameter Store, but it has no dedicated S3 encryption evaluation capability. The combination would neither detect S3 buckets lacking SSE-KMS nor automatically fix them.

  • ✗

    Amazon Macie and AWS CloudFormation.

    Why it's wrong here

    Amazon Macie uses machine learning to discover, classify, and protect sensitive data such as PII in S3 buckets; it does not evaluate whether the bucket's default encryption is SSE-KMS. AWS CloudFormation is an infrastructure-as-code service for provisioning resources, and although a template can create a compliant bucket, it cannot continuously audit an existing non-compliant bucket or trigger remediation when the setting drifts. Therefore, this pair fails the requirement for continuous detection and automatic remediation.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

One of 1,169 original SOA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

This SOA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the SOA-C02 exam.