Courseiva

DEA-C01 Data Security and Governance Practice Question

A company uses AWS KMS to encrypt data in Amazon S3. The security team wants to ensure that the KMS key can only be used from within the company's VPC. Which policy element should be added to the KMS key policy?

⚠ Common exam trap

Watch out — candidates often confuse the Principal element with condition keys, or mistakenly using aws:SourceIp or kms:ViaService instead of aws:SourceVpc. Candidates often think that restricting by IP or by service is sufficient to restrict to a VPC, but only aws:SourceVpc directly validates the VPC origin.

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

✓

Add a condition using aws:SourceVpc to allow only requests from the VPC.

The correct approach is to add a condition using the aws:SourceVpc condition key in the KMS key policy. This condition evaluates the VPC ID from which the request originates, allowing you to restrict key usage to requests that come through a VPC endpoint within your VPC. When a request is made to KMS through a VPC endpoint, the aws:SourceVpc condition key is populated with the VPC ID, enabling precise control. This ensures that the KMS key can only be used from within the specified VPC, meeting the security team's requirement.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Set the Principal element to restrict access to the VPC.

    Why it's wrong here

    The Principal element names identities, not networks, so it cannot restrict key use to a VPC. It is tempting because scoping access by principal is standard policy practise, and that would be correct when limiting which IAM roles or accounts may use the key. Network restriction requires a condition element.

  • ✗

    Add a condition using aws:SourceIp to allow only IP addresses from the VPC.

    Why it's wrong here

    aws:SourceIp evaluates the caller's public IP, which for in-VPC traffic is often a NAT gateway address, not a VPC-internal one, so it cannot restrict key use to the VPC. It suits allow-listing known external client addresses, not enforcing VPC origin; that requires aws:SourceVpce or aws:SourceVpc.

  • ✓

    Add a condition using aws:SourceVpc to allow only requests from the VPC.

    Why this is correct

    Adding an `aws:SourceVpc` condition to the KMS key policy restricts key usage to requests originating from the specified VPC endpoint, satisfying the requirement that the key only be usable from within the company's VPC. This condition evaluates the VPC ID of the source, blocking access from outside the VPC.

  • ✗

    Add a condition using kms:ViaService to allow only via VPC endpoints.

    Why it's wrong here

    kms:ViaService restricts which AWS service may use the key on a caller's behalf, not the caller's network origin. It is tempting because it constrains key usage contextually, and that would be correct when limiting use to S3 or another integrated service. VPC restriction needs aws:SourceVpce.

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,321 original DEA-C01 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 and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

This DEA-C01 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 DEA-C01 exam.