DVA-C02 - Security (26% of the exam) - Section 2.5

Encrypt and decrypt application data with AWS KMS using customer managed keys, envelope encryption, key rotation and cross-account key access.

Encrypt and decrypt application data using AWS KMS customer managed keys, and apply envelope encryption to protect large payloads without passing them through KMS directly. Configure automatic key rotation and understand cross-account key access policies so application code can use keys owned by another AWS account.

AWS KMSCustomer managed keysEnvelope encryptionKey rotation

Practice question for this objective

Free sampleSecurityhard

An application running under an IAM role has an identity-based policy that allows kms:Decrypt on a customer managed key. When the role calls Decrypt on ciphertext produced by that key, AWS KMS returns an access denied error, yet CloudTrail shows the IAM policy is attached and the key is enabled. The key's policy contains only the statement that grants the account root the kms:* actions for a different key administrator team. Which change lets the role decrypt while keeping least privilege?

  • AAttach a second identity-based policy to the role that allows kms:* on every key, since the first policy was too narrow to authorise the Decrypt call against the ciphertext.
  • BRecreate the customer managed key with automatic rotation turned on so a fresh key version is issued that the role's existing identity-based policy is then permitted to decrypt.
  • CAdd a statement to the key policy that allows the role's ARN to call kms:Decrypt, or enable IAM policies for the key by granting the account principal in the key policy. Correct
  • DMove the role into the key administrator team's IAM group so it inherits the kms:* permission the key policy already grants to that team for the different key.
A customer managed key's key policy is the primary access control and must grant a principal before IAM policies can authorise key use. AWS KMS evaluates the key policy first; unless the key policy grants the principal directly or delegates to IAM by allowing the account principal, an IAM allow has no effect and Decrypt is denied for that key.

Why A is wrong: Tempting if you assume IAM alone authorises key use, but widening IAM cannot help when the key policy itself never grants the principal, and kms:* breaks least privilege.

Why B is wrong: Tempting because rotation sounds like a reset, but rotation changes backing key material, not access control, so the role is still blocked by the unchanged key policy.

Why C is correct: Correct because a customer managed key is governed by its key policy, which must grant access before any IAM policy can take effect for that key.

Why D is wrong: Tempting since the team has access, but the grant is scoped to a different key and joining an admin group violates least privilege rather than scoping Decrypt narrowly.

See more DVA-C02 practice questions, answers explained.

Exam traps in Security

Answers that look right on this material and are not. Each one is a distractor from a different question in the DVA-C02 bank for this domain.

  • Call the KMS Encrypt API once per object, passing the full object plaintext so KMS encrypts the data directly under the customer managed key each time.

    Why it is wrong: The KMS Encrypt API caps plaintext at roughly four kilobytes and sends data to KMS, so it cannot encrypt large objects and multiplies service calls, which the requirement rules out.

  • Send the entire plaintext file to the KMS Encrypt API so the customer managed key protects the object directly server side.

    Why it is wrong: Tempting because Encrypt does use the CMK, but KMS Encrypt caps at 4 KB and sending large files defeats the call-limiting goal of envelope encryption.

  • Use SSE-S3 with Amazon S3 managed keys, since S3 handles the keys transparently and the team can disable the bucket key whenever access must be revoked.

    Why it is wrong: SSE-S3 keys are fully owned and rotated by S3 with no customer control or per-key audit, and there is no customer-disable switch, so it cannot meet the control and revocation requirement.

Examworthy is not affiliated with or endorsed by Amazon Web Services. Original, blueprint-aligned practice material only.