Question 1
A company wants to detect and automatically remediate EC2 instances that are missing required security patches across accounts, with a compliance report for auditors. Which approach fits BEST?
- Disable automatic updates to keep instances stable
- Replace instances only when they are compromised
- Patch Manager across the organization with compliance reporting — Correct
- Ask each team to patch instances manually and report in a spreadsheet
Correct answer
Patch Manager across the organization with compliance reporting
Explanation
Patch Manager across the organization automates patching and reports compliance. Manual work is inconsistent. Waiting for compromise is unacceptable. Disabling updates leaves vulnerabilities.
Question 2
A company wants to stop developers from deleting production CloudWatch log groups while still allowing them to read logs. Which approach fits BEST?
- A weekly backup of log groups to S3
- A dashboard that shows when log groups are deleted
- A naming convention for production log groups
- An SCP or permission set that denies logs:DeleteLogGroup in production — Correct
Correct answer
An SCP or permission set that denies logs:DeleteLogGroup in production
Explanation
Denying the delete action prevents removal while reads remain allowed. Dashboards, backups, and naming do not prevent deletion.
Question 3
A company stores secrets in Secrets Manager and wants to detect secrets that have not been rotated in 90 days. Which approach fits BEST?
- The secretsmanager-secret-periodic-rotation Config rule — Correct
- Amazon Inspector scanning of Secrets Manager
- CloudWatch dashboards for each secret
- A monthly manual review of each secret's creation date
Correct answer
The secretsmanager-secret-periodic-rotation Config rule
Explanation
This Config rule checks rotation within a period. Manual reviews are slow. Inspector does not scan secrets. Dashboards do not evaluate rotation.
Question 4
A company uses Amazon ECR. It wants to make sure that images pulled by EKS come only from its own ECR repositories in approved accounts. Which approach fits BEST?
- Use a NAT gateway so that pods can pull images from any registry
- An admission policy allowing only approved ECR registries — Correct
- Store image names in a spreadsheet and check them before each deployment
- Allow any public registry and rely on runtime monitoring to detect bad images
Correct answer
An admission policy allowing only approved ECR registries
Explanation
Admission policies restrict image sources, and repository policies control access. Public registries, open egress, and spreadsheets do not enforce sources.
Question 5
A company must encrypt all data at rest in its CI/CD system, including CodeBuild logs, artifacts, and cache. Which configuration fits BEST?
- Customer managed KMS keys for artifacts, cache, and log groups — Correct
- Rely on developers to encrypt files manually before committing them
- Store build artifacts in a public bucket and protect them with obscure names
- Disable build logs so that there is nothing to encrypt
Correct answer
Customer managed KMS keys for artifacts, cache, and log groups
Explanation
Customer managed keys on artifact stores, caches, and log groups encrypt CI/CD data at rest. Manual encryption is unreliable. Public buckets and disabled logs are inappropriate.
Question 6
A company needs to audit every API call in all accounts and Regions and keep the logs tamper-evident. Which configuration fits BEST? (Choose TWO.)
- AWS Budgets in the management account
- CloudTrail log file integrity validation — Correct
- An organization trail for all Regions delivered to a central log archive bucket — Correct
- VPC flow logs in every subnet
- CloudWatch dashboards in each account
Correct answer
CloudTrail log file integrity validation; An organization trail for all Regions delivered to a central log archive bucket
Explanation
An organization trail captures all accounts and Regions, and integrity validation makes logs tamper-evident. Dashboards, flow logs, and budgets do not audit API calls.
Question 7
A company wants to enforce that all Lambda functions in production use only code signed by the CI/CD pipeline. Which feature fits BEST?
- Lambda reserved concurrency set to 0 for unsigned functions
- Lambda code signing with an AWS Signer profile and an enforce policy — Correct
- Lambda environment variables encrypted with a customer managed key
- Lambda function URLs with AWS_IAM authorization
Correct answer
Lambda code signing with an AWS Signer profile and an enforce policy
Explanation
Code signing with an enforce policy rejects unsigned code. Concurrency, environment variable encryption, and function URL auth do not verify code.
Question 8
A company wants its pipeline to detect hardcoded secrets and vulnerable code in Lambda functions before deployment and continuously afterward. Which approach fits BEST?
- Encrypt the deployment package with KMS to remove the hardcoded secrets
- Store all code in a private repository, which prevents vulnerabilities
- Rely on peer code reviews only, without automated scanning
- Inspector code scanning in the pipeline plus Inspector Lambda scanning — Correct
Correct answer
Inspector code scanning in the pipeline plus Inspector Lambda scanning
Explanation
Automated code scanning in the pipeline and continuous Lambda scanning catch issues. Reviews alone miss issues. Private repositories and encryption do not remove vulnerabilities or secrets.
Question 9
A company needs to rotate RDS credentials automatically, and applications must keep working during rotation. Which approach fits BEST?
- A cron job that changes the password in the database once a month
- Secrets Manager rotation with the alternating users strategy — Correct
- Disabling rotation and using a very long password
- Rotating credentials manually and redeploying all applications
Correct answer
Secrets Manager rotation with the alternating users strategy
Explanation
Alternating users rotation keeps one valid credential at all times. Cron jobs and manual rotation risk outages. No rotation does not meet the requirement.
Question 10
A company wants to block deployments of IAM policies that grant wildcard actions on all resources, as part of its CI pipeline. Which approach fits BEST?
- Use AWS Trusted Advisor to delete wildcard policies automatically
- IAM Access Analyzer policy validation and custom checks in CI — Correct
- Deploy the policies and review them in the IAM console the following week
- Store the policies in a private repository so that only trusted people can edit them
Correct answer
IAM Access Analyzer policy validation and custom checks in CI
Explanation
Access Analyzer checks validate policies and detect broadened access before deployment. Post-deployment reviews are late. Private repositories do not validate. Trusted Advisor does not delete policies.