Courseiva
Security and Compliance →hardMultiple Choice

DOP-C02 Security and Compliance Practice Question

A company's security team suspects that an attacker has compromised an IAM user's access keys. The keys were used to launch instances in an unauthorized region. What is the FASTEST way to mitigate the threat?

⚠ Common exam trap

Watch out — candidates often confuse password changes (console access) with access key rotation (programmatic access), or they overcorrect by deleting the entire user instead of simply rotating the compromised keys.

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

✓

Rotate the access keys immediately.

Rotating the access keys immediately invalidates the compromised keys, preventing further unauthorized use without disrupting the IAM user's other permissions or requiring a full user recreation. This is the fastest mitigation because it directly revokes the attacker's access while allowing the legitimate user to continue using new keys after rotation.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Delete the IAM user.

    Why it's wrong here

    Deleting the IAM user is an irreversible, overly broad action that strips all permissions and breaks every workload relying on that principal, including applications, pipelines, and roles that assume identity. While it would eventually invalidate the stolen access keys, it requires recreating the user and re-attaching policies, causing significant downtime, whereas rotating the keys addresses the compromise immediately and preserves legitimate operations.

  • ✗

    Change the IAM user's password.

    Why it's wrong here

    A password change only affects the IAM user's console login credentials. The attacker's Amazon access key ID and secret access key are separate, long-lived programmatic credentials that continue to authenticate API calls with Signature Version 4, so a password reset does nothing to stop unauthorized API requests.

  • ✓

    Rotate the access keys immediately.

    Why this is correct

    Rotating the access keys means generating a new access key pair for the IAM user, updating dependent applications with the new credentials, and then deactivating and deleting the compromised keys. This immediately denies requests signed with the stolen keys because IAM checks key validity for every call, making it the fastest, least-disruptive way to stop the attacker.

  • ✗

    Attach an AWS WAF to block the attacker's IP address.

    Why it's wrong here

    AWS WAF operates at the HTTP layer, inspecting traffic destined for resources such as CloudFront, Application Load Balancers, or API Gateway; it cannot inspect or block API calls signed to IAM service endpoints. Additionally, the attacker's IP address is not the attack surface—the compromised credential is—so an IP-based block would not prevent use of the stolen access keys from different networks or proxies.

About these practice questions

This DOP-C02 question is part of Courseiva's 1,298-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. 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 DOP-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 DOP-C02 exam.