Home › Certifications › AWS Certified DevOps Engineer DOP-C02 › Security and Compliance
26 multiple-choice questions and 11 flashcards on Security and Compliance, about 17% of the AWS Certified DevOps Engineer DOP-C02 bank. Every one carries a written rationale.
Security and Compliance is one of 6 chapters in CoStudy's AWS Certified DevOps Engineer — Professional (DOP-C02) bank, and it holds 26 of the bank's 150 multiple-choice questions — roughly 17% of the total. That proportion is not arbitrary: chapters follow the certifying body's published exam outline, and the number of questions in each is set by that domain's published weight, so the share of your practice time this chapter takes matches the share of the real exam it accounts for.
Studying by chapter is worth doing once you have a diagnostic score. A single overall percentage tells you whether you are close; it does not tell you which domain is dragging. Working a weak chapter in isolation, and re-testing it in isolation, is the fastest way to move a score that has stalled — and it is why the mock exams in CoStudy report by domain rather than as one number.
10 questions drawn from this chapter, with the full rationale shown — the controlling principle behind the right answer, and why each wrong option tempts and fails.
A team wants AWS Inspector v2 to continuously scan all ECR images in the account for CVEs and notify on critical findings. Which configuration is BEST?
Answer: A — Enable Inspector v2 with ECR scanning at the account level
Inspector v2 + EventBridge findings is the documented pattern. B/C/D scan different things.
AWS CONFIG REMEDIATION:
Answer: B — Auto-remediation via SSM Automation documents triggered when an AWS Config rule reports non-compliance
Config + Auto Remediation: governance at scale. SSM Automation documents fix common drifts. EventBridge can route Config events to Lambda for custom actions. Conformance Packs bundle rules + remediations. Critical for compliance enforcement. DOP governance + automation.
A team wants to enforce that no IAM principal can disable CloudTrail in any account. Which control BEST achieves this org-wide?
Answer: C — Service Control Policy on the Organization root denying
SCPs are the org-wide preventive control. B is per-principal. C/D are detective.
CONTAINER IMAGE SCANNING:
Answer: A — ECR enhanced scanning (Inspector v2 integration): vulnerability +
Container image scanning: critical for security. ECR Basic Scanning (free, CVEs only). Enhanced Scanning (Inspector v2 integration) — secrets + OS + language packages. Lambda containers also scanned. Quarantine vulnerable images. Tools alternative: Trivy, Snyk, Aqua in pipeline. DOP container security.
Which is the BEST way to detect and block AWS API actions originating from IP ranges outside the corporate network?
Answer: A — IAM policy condition with aws:SourceIp deny on key roles, paired
aws:SourceIp in IAM conditions is the documented IP guardrail; GuardDuty supplies detection. B/C don't reach IAM. D doesn't help.
Which is the recommended way to manage SECRETS in CI/CD pipelines?
Answer: D — AWS Secrets Manager (rotating credentials) and Parameter
Secrets management: Secrets Manager for rotation (DB creds), Parameter Store (free standard tier) for general config. Pipeline IAM role retrieves at runtime. Reference in CodeBuild buildspec, ECS task definition, Lambda env vars (encrypted with KMS).
A team needs to grant a CI/CD role in account A access to deploy to an S3 bucket in account B. Which is the CORRECT combination?
Answer: C — Bucket policy in account B granting the account-A role
Cross-account S3 requires both sides. Off-by-one IAM trap. B/C alone fails. D denies but doesn't grant.
Which is the BEST way to enforce security policies in IaC?
Answer: B — cfn-lint / cfn-nag (CloudFormation linting) and CDK Aspects for pre-deployment policy checks, backed by AWS Config rules post-deployment
Policy-as-code for IaC: pre-deployment linting (cfn-nag, cfn-lint, Checkov, tfsec). CDK Aspects programmatic enforcement. Post-deployment AWS Config rules + remediation. Defense in depth.
AWS WAF managed rules need to block known SQL injection patterns on a CloudFront distribution. The team also wants log samples of blocked requests for tuning. Which configuration is CORRECT?
Answer: A — Attach the AWS managed SQL injection rule group to the WAF web
Managed rule + WAF logging is the documented setup. Shield Standard is DDoS only. C/D unrelated.
A team needs all CloudTrail logs to be immutable and queryable via SQL for 7 years. Which BEST combination meets the requirement?
Answer: C — CloudTrail Lake event data store with extended retention up to 7
CloudTrail Lake supports up to 7-year retention + SQL. Object Lock for immutability. B is short retention. C lacks immutability. D wrong.
4 cards from the 11 in this chapter.
AWS WAF managed rules?
Pre-built rule sets (OWASP Top 10, bot control). Save custom rule writing.
Secrets Manager rotation?
Lambda function rotates secret. Built-in for RDS.
Security Hub auto-remediation?
Custom action → EventBridge → Lambda fixes finding.
Parameter Store SecureString?
KMS-encrypted parameter. For non-rotating config secrets.
These are a sample. The full Security and Compliance chapter runs 37 items with per-chapter progress tracking, on the web and in the iOS app.
Open AWS Certified DevOps Engineer DOP-C02 in CoStudy →
All AWS Certified DevOps Engineer DOP-C02 practice questions →