Free AWS DevOps Engineer Professional Practice Exam (DOP-C02)
Full-length DOP-C02 mock exams with the same number of questions and time as the real exam. CI/CD, infrastructure as code, resilience, monitoring, incident response and security scenarios, answers explained, and your score by domain.
1. Choose a set
2. Choose a mode
75 questions · 3 hours · same as the real exam
A company runs CodePipeline in us-east-1 and adds a deploy action that creates a CloudFormation stack in ap-southeast-2. The pipeline is defined in CloudFormation. The new action fails during pipeline creation because the artifacts are not available in that Region. Which change BEST fixes the problem?
Cross-Region actions need an artifact store in each Region where actions run, defined in the pipeline's artifact stores map. CodePipeline then copies artifacts to that Region automatically. Replicating the bucket yourself is not how CodePipeline locates cross-Region artifacts.
A photo sharing company stores uploads in an S3 bucket. Three separate teams each need their own Amazon SQS queue to receive every object-created event for the uploads/ prefix. The company wants the bucket's event notification setup to stay simple. Which solution BEST meets these requirements?
An SNS topic fans out each S3 event to every subscribed queue, so all three teams get every event from one notification configuration. S3 does not allow overlapping notification configurations with the same prefix and event type, so three separate configurations would be rejected.
A SaaS company bakes a new AMI every week and must roll it out to an Auto Scaling group of 60 instances behind an Application Load Balancer. The rollout must keep at least 90 percent of capacity healthy, pause after the first 10 percent for validation, and roll back automatically if CloudWatch alarms fire. The company wants the least custom tooling. Which solution BEST meets these requirements?
Instance refresh natively supports a minimum healthy percentage, checkpoints, and automatic rollback when specified alarms go into ALARM. A scripted batch replacement could work but adds the custom tooling the company wants to avoid.
A payments company uses a V2 pipeline that deploys database migrations. Developers often push several commits within minutes. Every commit must be deployed in order, and no commit may be skipped by a newer execution. Which configuration BEST meets these requirements?
QUEUED mode processes executions one at a time in the order they arrive, so no commit is skipped. SUPERSEDED mode lets a newer execution replace a waiting one, which skips commits. PARALLEL mode runs executions independently, so order is not guaranteed.
An insurance company invokes a Lambda function asynchronously from an internal application. When an invocation fails after all retries, the support team needs one record that contains the original event, the error message, and the stack trace. The team wants to use a native Lambda feature. Which solution BEST meets these requirements?
An on-failure destination receives an invocation record with the request payload and the response, which includes the error message and stack trace. A dead-letter queue keeps only the event payload with limited error attributes, so it does not include the full error details.
A data processing company runs a stateless worker fleet in an Auto Scaling group that uses only On-Demand c5.2xlarge instances. It wants to cut compute cost with Spot Instances while keeping a baseline of 4 On-Demand instances. It also wants to reduce the chance of Spot interruptions. Which solution BEST meets these requirements?
Diversifying across several instance types and using the price-capacity-optimized strategy places Spot capacity in the deepest pools, which lowers interruption risk while the On-Demand base keeps the baseline. A single instance type with lowest-price allocation concentrates the fleet in a few pools that are more likely to be interrupted.
A company uses a V2 pipeline with a production deploy stage. When that stage fails, engineers currently find the last good commit and rerun the pipeline by hand, which takes 30 minutes. The company wants the stage to return to the last successful version automatically. Which solution BEST meets this requirement?
V2 pipelines support automatic stage rollback, which redeploys the source revisions from the last successful execution of that stage. Retrying the failed action reruns the same bad version. Restarting the pipeline uses the latest commit, which is the version that failed.
A company uses an Amazon SQS queue as a Lambda event source with a batch size of 10. When one message in a batch fails, the whole batch returns to the queue, and messages that succeeded are processed again. The team wants only the failed messages retried while keeping batching for throughput. Which solution BEST meets these requirements?
With ReportBatchItemFailures, the function returns the IDs of failed messages, and only those messages become visible again for retry. A batch size of 1 also avoids reprocessing, but it gives up batching and lowers throughput.
A company's Auto Scaling group launches instances that run a configuration script to register with a license server and pull secrets. Health checks sometimes pass before the script finishes, so the load balancer sends traffic to instances that are not ready. The company wants instances to enter service only after the script succeeds and to be terminated if it fails. Which solution BEST meets these requirements?
A launch lifecycle hook keeps the instance in Pending:Wait until the script signals CONTINUE, and ABANDON causes the group to terminate it. The health check grace period only delays health check replacement and does not stop traffic or handle a failed script.
A company runs integration tests in CodeBuild that create temporary resources in the post_build phase. When a test fails, the build stops and the cleanup commands never run, which leaves resources behind. The cleanup must run whether the tests pass or fail. Which buildspec change BEST meets this requirement?
Commands in a finally block run after the phase's commands even if those commands fail. That guarantees cleanup in both outcomes. Setting on-failure to ABORT stops the build earlier and does not run cleanup.
A team builds serverless applications with Lambda, API Gateway and DynamoDB and wants a concise template format plus a CLI that packages code, deploys through CloudFormation and can set up gradual Lambda deployments with CodeDeploy using a single property. Which tool should the DevOps engineer standardize on?
AWS SAM extends CloudFormation with shorthand serverless resources, and its DeploymentPreference property wires up CodeDeploy traffic shifting for Lambda automatically. Hand-written CloudFormation can do the same but needs far more template code for each function.
An operations team wants one place to track and resolve operational issues across its AWS accounts. When certain CloudWatch alarms fire, a work item should be created automatically with the related resources and suggested runbooks. Engineers want to investigate and run remediation from the same console. Which solution BEST meets these requirements?
CloudWatch alarms can create OpsItems in OpsCenter, which show related resources and let engineers run Automation runbooks from the same console. An email inbox or a custom dashboard gives no built-in link to resources or runbooks.
A logistics company uses Route 53 failover routing for an internal API. The primary endpoint is the private IP address of an application server in a VPC, and the secondary is a standby server in another Region. The health check for the primary never reports healthy because Route 53 health checkers cannot reach private IP addresses. Which solution BEST provides automatic failover based on the primary's health?
Route 53 health checks can track the state of a CloudWatch alarm, which works for private resources that health checkers cannot reach over the internet. Opening the security group does not help because the private IP address is not reachable from the public health checkers.
A software vendor must test a library against three runtime versions on two operating systems. The team currently maintains six nearly identical CodeBuild projects. The company wants one project that runs all combinations in parallel. Which solution BEST meets this requirement?
A batch build matrix runs parallel builds for each combination of the listed environment settings from one project. A loop runs the tests serially and on one OS image. Six pipeline actions still require separate configuration to maintain.
A company requires S3 Block Public Access to stay turned on for every bucket in a regulated account. If anyone removes the Block Public Access configuration from a bucket, it must be reapplied automatically within a few minutes. CloudTrail is enabled for management events. Which solution BEST meets these requirements?
CloudTrail management events reach EventBridge within minutes, so a rule on DeletePublicAccessBlock can trigger a function that puts the setting back right away. A periodic Config rule only reports the issue once a day and takes no corrective action.
A ride sharing company stores trip data in a DynamoDB table in us-east-1. It is expanding to Europe and needs users in both Regions to read and write locally with single-digit millisecond latency. The application must keep working in one Region if the other Region fails. Which solution BEST meets these requirements?
Global tables provide fully managed multi-Region, multi-active replication, so each Region can read and write locally and keep working if the other Region fails. A Streams and Lambda copy is one-way, adds custom code, and does not support local writes in Europe.
A company deploys a Lambda function with CodeDeploy linear traffic shifting. The team wants to invoke the new version with synthetic requests and confirm it works before it receives any production traffic. A failed check must stop the deployment. Which solution BEST meets this requirement?
The BeforeAllowTraffic hook runs before any traffic shifts to the new version, and a failure status stops and rolls back the deployment. AfterAllowTraffic runs only after all traffic has moved. A canary against the production alias tests traffic that users already see.
A developer's new CloudFormation stack keeps failing during creation. Each time, the rollback deletes all resources before the developer can inspect them. The developer wants resources that were created successfully to stay in place so the failure can be debugged and the stack operation retried. Which solution BEST meets these requirements?
Preserving successfully provisioned resources pauses the stack in a failed state instead of rolling back, so the developer can inspect it and retry. Termination protection only prevents stack deletion and does not stop a creation rollback.
A company uses CodeDeploy blue/green deployments for an Amazon ECS service. After traffic shifts, some issues only appear under real load about 30 minutes later. The company wants a fast rollback to the previous task set during the first hour without redeploying. Which solution BEST meets this requirement?
The termination wait time keeps the original task set running after the traffic shift, so a rollback simply reroutes traffic back to it. Redeploying the old task definition takes longer. A linear shift finishes in about 30 minutes and then removes the old tasks, which does not cover the full hour.
A social media company stores user sessions in a single-node ElastiCache for Redis OSS cluster. When the node failed last month, all users were logged out and recovery took 20 minutes. The company wants sessions to survive a node or Availability Zone failure, with automatic recovery in about a minute. Which solution BEST meets these requirements?
With replicas in other Availability Zones and Multi-AZ enabled, ElastiCache promotes a replica automatically when the primary fails, usually within about a minute. Daily snapshot restores lose up to a day of sessions and take far longer to recover.
An EC2 Auto Scaling group uses a launch template with EBS volumes encrypted by a customer managed KMS key. New instances fail to launch, and the scaling activity history shows a client error about the KMS key used for the volumes. The key is enabled. Which solution BEST meets these requirements?
Amazon EC2 Auto Scaling uses its service-linked role to create encrypted volumes, so that role needs permission to use the customer managed key and create grants. The instance profile role is used by software on the instance after launch, not by Auto Scaling when it creates volumes.
A company deploys an application with CodeDeploy to EC2 instances in an Auto Scaling group. When the group scales out, new instances start without the application and fail health checks. Instances must receive the latest successful revision automatically. Which solution BEST meets this requirement?
When an Auto Scaling group is part of a deployment group, CodeDeploy adds a lifecycle hook and deploys the last successful revision to new instances before they go in service. A cron job bypasses CodeDeploy and its hooks. Rerunning the pipeline deploys the newest commit to the whole fleet, which is not intended.
An insurance company's Lambda function processes claim uploads and writes to an RDS for MySQL database. During large batch uploads, the function scales to hundreds of concurrent executions and exhausts database connections, which also affects other applications. The company wants to cap the function at 50 concurrent executions and guarantee it that capacity. Which solution BEST meets these requirements?
Reserved concurrency both sets aside and caps the concurrency for one function, so it never exceeds 50 executions. Provisioned concurrency pre-initializes environments but does not cap scaling, so extra requests still run as on-demand executions.
A company uses CodeDeploy in-place deployments to EC2. A database migration script must run after the new application files are copied to the instance but before the application starts. Which AppSpec lifecycle hook should run the script?
AfterInstall runs after the files are copied and before ApplicationStart, which fits a migration that needs the new files. BeforeInstall runs before the files are copied. ValidateService runs after the application has already started.
A company deploys a web application to EC2 with AWS CodeDeploy using the OneAtATime configuration. A recent release passed every lifecycle hook but caused a spike in HTTP 5xx errors, and the team rolled back manually an hour later. The team wants future deployments to stop and roll back automatically when the error rate rises. Which solution BEST meets these requirements?
CodeDeploy can monitor CloudWatch alarms during a deployment, stop it when an alarm goes into ALARM, and roll back to the last good revision. Rollback on deployment failure alone does not help here because every lifecycle hook succeeded.
A brokerage company needs a DR strategy for its trading portal in a second Region. The business requires an RTO of 15 minutes and an RPO under 1 minute. The full application stack must already run in the DR Region at reduced size so it can take a small share of live traffic for continuous testing, but the company will not pay for full production capacity there. Which DR strategy BEST meets these requirements?
Warm standby runs a smaller, fully functional copy of the stack that can serve some traffic and scale out quickly, which fits the RTO, RPO, and cost limits. Pilot light keeps only core data services running, so it cannot serve live test traffic without first launching the application tier.
A company has 40 accounts in AWS Organizations. Teams in every account must publish and consume internal Python packages from one place. The company wants to manage packages centrally and avoid storing duplicate copies in each account. Which solution BEST meets these requirements?
A single CodeArtifact domain stores each package asset once, and a domain policy can grant access to all accounts in the organization. Repository policies then control read and publish rights. One domain per account duplicates storage and needs custom sync jobs.
A company's order service publishes events to a custom Amazon EventBridge event bus. Last month a downstream consumer had a bug for six hours and silently discarded the events it received. The team wants to be able to reprocess events from a specific past time window after future incidents, without asking publishers to resend. Which solution BEST meets these requirements?
EventBridge archives store events from a bus, and a replay sends events from a chosen time window back to the bus. A dead-letter queue only captures events that EventBridge failed to deliver, and these events were delivered and then discarded by the consumer.
A company builds images on top of public base images from Docker Hub. Builds fail during busy periods because of Docker Hub rate limits. The company wants base images cached in its private Amazon ECR registry and refreshed automatically, with minimal maintenance. Which solution BEST meets this requirement?
A pull through cache rule caches upstream images in the private registry on first pull and keeps them in sync. Docker Hub rules need credentials stored in Secrets Manager. ECR replication only copies between ECR registries, not from Docker Hub.
A legal firm stores case documents in an S3 bucket in us-east-1 and replicates them to us-west-2 for disaster recovery. A new contract requires that 99.99 percent of new objects be replicated within 15 minutes. The team must also be alerted when replication falls behind. Which solution BEST meets these requirements?
S3 Replication Time Control is designed to replicate 99.99 percent of objects within 15 minutes and publishes replication metrics and events for alerting. Batch Replication is meant for existing objects and on-demand jobs, not for a continuous replication time guarantee.
A company's requests flow through Amazon API Gateway, three ECS services, and a Lambda function. Each component writes a shared request ID to its own CloudWatch Logs log group. During an incident, an engineer must quickly find every log line for a set of failing request IDs across all components, without exporting data. Which solution BEST meets these requirements?
Logs Insights can query many log groups at once and filter on a field such as the request ID, which returns the matching lines in place. Exporting to S3 for Athena works but is slower and breaks the requirement to avoid exporting data.
A company stores images in an ECR repository in a shared services account. ECS tasks in a production account fail to start because they cannot pull images from that repository. The production task execution role already has the required ECR permissions in its own policy. What should the DevOps engineer do?
Cross-account pulls need permission on both sides, and the repository policy in the shared account must allow the production principal. The role policy alone is not enough. Replication in the reverse direction would not place the images in production.
A company's DR runbook for a Regional outage has six manual steps, including promoting a cross-Region RDS read replica, updating a Route 53 record, and scaling out an Auto Scaling group in the DR Region. Engineers make mistakes under pressure, but leadership requires a human approval before failover starts. The company wants a repeatable and auditable process. Which solution BEST meets these requirements?
An Automation runbook codifies the steps, pauses at the aws:approve step for a named approver, and records each execution for audit. An alarm-driven Lambda function automates the failover but skips the human approval that leadership requires.
A company runs integration tests against a shared staging environment. Tests from different pull requests interfere with each other and give false failures. The company wants isolated test environments for each change at the lowest ongoing cost. Which solution BEST meets these requirements?
Ephemeral stacks give each change its own environment and are deleted after tests, so the company pays only while tests run. Permanent accounts per developer cost more. Testing only after merge lets defects into the main branch.
A company's pipeline in a tools account assumes a deployment role in each workload account. The deployment role's trust policy trusts the tools account root principal, so any principal in the tools account with sts:AssumeRole permission could use it. Security wants only the pipeline's role to be able to assume it. Which solution BEST meets these requirements?
Naming the specific pipeline role ARN as the trusted principal means no other principal in the tools account can assume the deployment role. A permissions boundary limits what the role can do after it is assumed, not who can assume it.
A marketing analytics company runs an Aurora PostgreSQL cluster on a large provisioned writer that is mostly idle but spikes unpredictably for 10 to 30 minutes several times a day. The spikes are mostly write-heavy batch updates. The company wants capacity to scale in small steps within seconds and to stop paying for unused peak capacity, without changing database engines. Which solution BEST meets these requirements?
Aurora Serverless v2 scales the writer's capacity in fine-grained ACU steps within seconds and bills for the capacity actually used, with no engine change. Replica auto scaling adds readers, which does not help a write-heavy spike on the writer.
A security team requires that container images with critical vulnerabilities never reach Amazon ECR. Images are built in CodeBuild. The team wants to use a managed AWS scanning service rather than maintain its own vulnerability database. Which solution BEST meets these requirements?
Amazon Inspector CI/CD integration scans an SBOM during the build, so the build can fail before the image is pushed. Inspector maintains the vulnerability data. ECR enhanced scanning runs after the push, so vulnerable images briefly exist in the registry.
A company uses IAM Identity Center connected to its corporate directory. It has 25 project teams, and each engineer should manage only the EC2 instances tagged with their own team name. The company wants to avoid creating and maintaining a separate permission set for every team. Which solution BEST meets these requirements?
Attributes for access control pass the user's team as a session tag, so one permission set can allow actions when ec2:ResourceTag/team matches aws:PrincipalTag/team. Separate permission sets per team would work but create the maintenance the company wants to avoid.
A company's pipeline uses the GitHub version 1 source action with a personal OAuth token. Security wants to remove personal tokens and use the recommended app-based integration. Which solution BEST meets this requirement?
Connections use the AWS GitHub app instead of personal tokens, and they are the recommended source integration for GitHub. After the connection is created, it must be completed in the console to become available. Storing the token in Secrets Manager still relies on a personal token.
A legacy Java application on EC2 sends its logs to CloudWatch Logs through the CloudWatch agent. Log lines that contain the text OutOfMemoryError mean the service will soon crash. The team wants an alarm within a few minutes whenever one or more of these lines appear, without changing application code. Which solution BEST meets these requirements?
A metric filter turns matching log lines into a CloudWatch metric as they arrive, and an alarm on that metric fires within minutes. An hourly query is too slow and would need extra scheduling code to raise an alert.
An application fleet caches database credentials from AWS Secrets Manager for up to one hour. When Secrets Manager rotates the password of the single database user, some instances fail to connect until their cache refreshes. The team needs automatic rotation without these connection failures. Which solution BEST meets these requirements?
The alternating users strategy rotates between two database users, so the credentials from the previous version keep working while application caches refresh. Rotating more often would cause the same failures more often, and manual changes do not meet the automatic rotation requirement.
A test stage in CodePipeline runs three independent CodeBuild actions: unit tests, a static analysis scan and a license check. Each takes about 10 minutes, and they currently run one after another. The team wants the stage to finish faster without adding new stages. What should the DevOps engineer change?
Actions in a stage that share the same runOrder run in parallel, so the stage takes about as long as the slowest action instead of the sum. A larger compute type can speed each build a little but still runs them one after another.
An API team publishes Requests and Errors as two separate custom metrics. Alarms on raw error counts fire at peak hours even when the error rate is low, and they miss problems at night. The team wants to alarm when errors exceed 2 percent of requests over 5 minutes without publishing any new metric. Which solution BEST meets these requirements?
CloudWatch alarms can evaluate a metric math expression, so the error rate is calculated from the existing metrics with no new metric. Publishing an ErrorRate metric works but breaks the requirement to avoid new metrics.
A networking team owns a CloudFormation stack that creates a shared VPC. Several application teams deploy their own stacks into that VPC on their own schedules. The application stacks need the VPC and subnet IDs, and the network stack must be updatable independently. Which approach BEST meets these requirements?
Cross-stack references with exports and Fn::ImportValue share values between stacks that have separate owners and lifecycles. Nested stacks would create a separate VPC inside each application stack. Hardcoded IDs break when resources change.
A team's ECS task definition injects a database password from a Parameter Store SecureString parameter that is encrypted with a customer managed KMS key. The task definition uses the secrets section with valueFrom. Tasks fail to start with an access denied error when the parameter is retrieved. Which solution BEST meets these requirements?
ECS uses the task execution role to retrieve values referenced in the secrets section before the container starts, so that role needs access to the parameter and the key. The task role is used by the application code inside the container, not by ECS when it injects secrets.
A company's CloudWatch Logs bill keeps growing because every log group is set to Never expire. Engineers only query logs from the last 30 days, but auditors require 7 years of retention at the lowest possible cost. Archiving once a day is acceptable. Which solution BEST meets these requirements?
A 30-day retention policy limits CloudWatch storage cost, and daily export tasks move the logs to S3, where a lifecycle rule moves them to the lowest-cost archive class. Keeping 7 years of data in CloudWatch Logs costs far more than storing it in S3 Glacier Deep Archive.
A company's CloudFormation stacks include S3 buckets for build output. Stack deletion fails because the buckets still contain objects. The company wants stacks to delete cleanly without manual steps. Which solution BEST meets this requirement?
A Lambda-backed custom resource can run code during stack deletion, such as removing all objects, before CloudFormation deletes the bucket. DeletionPolicy Delete is already the default and still fails on non-empty buckets. Stack policies only affect updates.
A company runs a self-managed Jenkins server on an EC2 instance that deploys resources to AWS. The server uses the long-term access keys of an IAM user, which are stored in a configuration file. An audit flagged the keys as a risk, and the company wants to remove long-term credentials with the least effort. Which solution BEST meets these requirements?
An instance profile gives the server temporary credentials that rotate automatically, so no long-term keys are needed. Storing the keys in Secrets Manager protects them better, but they are still long-term credentials, which the audit wants removed.
A company updates a production stack that changes its Auto Scaling group and load balancer. The team wants CloudFormation to roll the update back automatically if the application 5XX error alarm fires during the update or in the 15 minutes after it. Which solution BEST meets this requirement?
Rollback triggers watch specified CloudWatch alarms during an update and for a configured monitoring period afterward. If an alarm fires, CloudFormation rolls back the stack. A change set preview happens before the update, so it cannot react to errors during it.
A security team wants full-text search across application logs from several CloudWatch Logs log groups and wants to build interactive dashboards in OpenSearch Dashboards. New log events must be searchable within seconds of being written. Which solution BEST meets these requirements?
A subscription filter streams log events as they arrive to an Amazon OpenSearch Service domain, which provides full-text search and dashboards within seconds. Hourly exports add up to an hour of delay, which misses the requirement.
A healthcare company uses Amazon Macie to scan S3 buckets for sensitive data. When Macie finds personal health information in a bucket that is not approved to store it, the security team wants the object tagged and a ticket opened automatically within minutes. Which solution BEST meets these requirements?
Macie publishes findings to EventBridge, so a rule can invoke a Lambda function that tags the object and calls the ticketing system within minutes. Macie only reports findings and has no option to delete objects, and weekly exports are far too slow.
A platform team wants all application teams using the AWS CDK to create S3 buckets and ECS services with encryption, logging and standard tags already applied. Teams should reuse these patterns with little code. Which approach BEST meets this requirement?
Custom higher-level constructs wrap resources with built-in defaults, and teams reuse them as normal code dependencies. Publishing the library in CodeArtifact makes versioned distribution easy. A wiki depends on each team following it correctly.
A payment service writes a log line with the order ID and the reason whenever a fraud check blocks a transaction. The fraud team wants a message in its chat tool within seconds for each blocked event, and each message must include the order ID and reason. Which solution BEST meets these requirements?
A subscription filter sends each matching event to Lambda within seconds, so the function can parse the order ID and reason and post them to chat. An alarm on a metric filter only reports a count and cannot include details from individual log events.
A company must run a log collection script on 2,000 instances tagged Env=prod. The script must run on no more than 10 percent of instances at a time, and it must stop if more than 5 percent of the invocations fail. Which solution BEST meets these requirements?
Run Command supports rate control with maximum concurrency and an error threshold, and it can target instances by tag. A State Manager schedule does not limit how many instances run at once in the way required. A per-instance sleep is slow and adds complexity.
A company must apply the same set of 40 AWS Config rules, with remediation actions, to every account in its organization, including accounts added later. It wants to deploy and manage the rules as one unit from a central account. Which solution BEST meets these requirements?
An organization conformance pack packages Config rules and remediation actions and deploys them as one unit to all accounts, including new ones. An aggregator only collects compliance data for viewing and does not deploy rules to source accounts.
A team runs 25 Lambda functions and suspects some are over-provisioned on memory while others reach their memory limits. The standard Lambda metrics do not show memory usage, CPU time, or network usage for each invocation. The team wants these system-level metrics with minimal code changes. Which solution BEST meets these requirements?
Lambda Insights uses a Lambda extension layer to collect system-level metrics such as memory, CPU time, and network usage with no code changes. X-Ray shows where time is spent in a request but does not report memory or CPU usage.
A company uses AWS Config to detect S3 buckets that allow public read access. The security team wants noncompliant buckets fixed automatically within minutes, without writing custom code. Which solution BEST meets this requirement?
AWS Config remediation can run a Systems Manager Automation runbook automatically when a resource becomes noncompliant. AWS provides managed runbooks for blocking public S3 access, so no custom code is needed. An SNS email only notifies and relies on a person.
A company's security baseline depends on AWS Config recording in every member account. Nobody in a member account, including account administrators, may stop or delete the configuration recorder or delivery channel. A dedicated security role in each account must still be able to make these changes. Which solution BEST meets these requirements?
An SCP limits all principals in member accounts, including administrators, and the aws:PrincipalArn condition exempts only the security role. Administrators could simply remove an IAM policy attached to their own roles, so it does not enforce the control.
A company must install a third-party monitoring agent on all Windows and Linux instances. The vendor supplies installers for each platform, and versions change monthly. New instances must get the agent automatically. Which solution BEST meets these requirements?
Distributor packages software for multiple platforms and versions, and a State Manager association installs it on matching instances, including new ones. Monthly AMI rebuilds and instance replacement take far more effort. A monthly Run Command misses instances launched between runs.
A company runs Java microservices on Amazon EKS. Leadership wants service level objectives, such as 99.9 percent of requests under 300 ms, tracked for each service. The team also needs automatically collected latency, error, and request metrics and a service map, without manually instrumenting code. Which solution BEST meets these requirements?
Application Signals auto-instruments supported applications, collects request, latency, and error metrics with a service map, and lets you create SLOs. Synthetics canaries measure synthetic test traffic, not the real requests that the SLOs must track.
A fintech company prepares for a PCI DSS audit every year. Engineers spend weeks collecting screenshots and configuration exports from dozens of accounts as evidence. The company wants evidence collected continuously and organized by control, with the least manual work. Which solution BEST meets these requirements?
Audit Manager uses prebuilt frameworks to collect evidence continuously from AWS sources and maps it to each control in an assessment. AWS Artifact provides AWS's own compliance reports, which describe AWS controls, not evidence about the company's workloads.
A company must patch and harden its base AMI every month, run tests on it, and share the approved AMI with 30 accounts and two Regions, with as little custom scripting as possible. What should the DevOps engineer use?
EC2 Image Builder automates building, hardening, testing and distributing AMIs on a schedule, including cross-account and cross-Region sharing. A self-managed Packer cron job works but requires custom scripting and its own maintenance.
A managed services provider must give three executives at a client company read-only access to one CloudWatch dashboard. The executives do not have AWS accounts. The provider does not want to create IAM users for them or make the dashboard public. Which solution BEST meets these requirements?
CloudWatch dashboard sharing can grant access to specific email addresses, and those users sign in with a username and password to view the dashboard without an AWS account. Public sharing lets anyone with the link see the dashboard, which the provider wants to avoid.
A company already runs policy-as-code checks in its CodePipeline pipelines. However, some teams deploy CloudFormation stacks directly from the console, which skips those checks. The company wants the same rules enforced on every CloudFormation stack operation in its accounts before resources are provisioned. Which solution BEST meets these requirements?
CloudFormation Hooks run inside the CloudFormation service for every stack operation, so they apply to console deployments as well as pipelines and can block noncompliant resources before creation. Adding pipeline rules does nothing for stacks deployed outside the pipeline.
A company stores an API key for a partner integration in Systems Manager Parameter Store. The key must be rotated every 90 days. The team wants an event 14 days before the key reaches 90 days old, and the parameter should expire if it is not rotated. Which solution BEST meets these requirements?
Parameter policies such as Expiration and ExpirationNotification are available only for advanced parameters. They delete the parameter at expiry and send EventBridge events ahead of time. Standard parameters do not support policies, and a tag does nothing on its own.
A company offers an EC2-based product through AWS Service Catalog. Users can currently choose any instance type, which has caused high costs. The company wants users to choose only from t3.medium and t3.large without editing the product template. Which solution BEST meets this requirement?
Template constraints apply rules to product parameters at launch time without changing the template. They can limit allowed values for the instance type. A launch constraint sets the role used for provisioning, not which parameter values users may choose.
A company with 120 accounts in AWS Organizations wants its central operations team to see AWS Health events, such as scheduled maintenance and service issues, for all accounts from one account. The team also wants to query these events through the AWS Health API without signing in to each account. Which solution BEST meets these requirements?
Organizational view aggregates AWS Health events for all member accounts, and a delegated administrator account can view and query them through the console and the organization Health API. Scripting calls into each account works but adds the per-account overhead the team wants to avoid.
A company stores customer reports in an S3 bucket. A compliance review requires that all requests to the bucket use encrypted connections. Any request sent over plain HTTP must be rejected. Which solution BEST meets these requirements?
A Deny statement with the aws:SecureTransport condition set to false rejects any request that does not use TLS. Default encryption protects data at rest only and has no effect on how requests travel over the network.
A company uses CloudFormation StackSets with service-managed permissions across its organization. Today only the management account can create stack sets. The security team wants a dedicated tooling account to manage stack sets so that daily work does not happen in the management account. Which solution BEST meets this requirement?
A delegated administrator account can create and manage service-managed stack sets for the organization by calling as DELEGATED_ADMIN. This keeps daily work out of the management account. IAM users in the management account still put the work in that account.
A company's Auto Scaling groups sometimes fail to launch instances because of insufficient capacity or invalid launch template settings. The team notices only later, when capacity is already low. The team wants an immediate notification that includes the failure details whenever a launch fails, with the least effort. Which solution BEST meets these requirements?
Amazon EC2 Auto Scaling emits an EC2 Instance Launch Unsuccessful event to EventBridge with the failure cause, and a rule can forward it to SNS right away. An alarm on group metrics shows that capacity is low but gives no details about why the launch failed.
A company wants every new Amazon EBS volume in its accounts to be encrypted, including volumes created by teams that forget to request encryption in their templates. Those volumes should still be created, but encrypted. The company wants a preventive setting with the least effort. Which solution BEST meets these requirements?
EBS encryption by default makes every new volume in that Region encrypted, even when the request does not ask for encryption. An SCP on ec2:Encrypted would block those requests instead of creating encrypted volumes, which breaks the requirement that the volumes still be created.
A company uses AWS Control Tower and wants to deploy CloudFormation templates and SCPs to accounts automatically whenever Account Factory creates a new account. The platform team wants to define the customizations in a manifest file stored in source control. Which solution BEST meets these requirements?
Customizations for AWS Control Tower uses a manifest in source control and runs its pipeline on Control Tower lifecycle events, such as account creation. It can deploy both CloudFormation templates and SCPs. Detective controls only report compliance and do not deploy resources.
A DevOps team uses AWS X-Ray to trace a multi-tenant API. Support engineers need to find all traces for a specific tenant ID by using filter expressions in the X-Ray console. The developers currently add the tenant ID to each segment as metadata, but filtering on it returns no results. Which change BEST meets this requirement?
X-Ray indexes annotations for use in filter expressions, while metadata is stored with the trace but cannot be searched. Raising the sampling rate records more traces but still leaves the tenant ID unsearchable.
A company uses a customer managed KMS key to encrypt objects in one S3 bucket in us-east-1. Security wants the application role to use the key only through Amazon S3 in that Region. The role must not be able to call KMS directly to decrypt arbitrary data. Which solution BEST meets these requirements?
The kms:ViaService condition allows the key to be used only when the request comes through the named service in that Region, so direct KMS calls by the role are denied. A source IP condition restricts where requests come from but still allows direct KMS calls from that range.
A company stores operational settings, such as timeouts and retry limits, in AWS AppConfig as freeform JSON. Last month a typo in one value took down production. The company wants AppConfig to reject invalid configuration before it is deployed. Which solution BEST meets this requirement?
AppConfig validators check configuration data against a JSON Schema or a Lambda function before deployment. Invalid data is rejected and never reaches the application. Bake time only watches alarms after the configuration is already deployed.
The real AWS DevOps Engineer Professional exam at a glance
Score 75% or more on two different sets before you book the real exam. Need a plan for your weak topics? See how we help you pass, or get a full refund.
More free AWS practice tests
Original practice questions written by CertOcean in the style of the AWS DevOps Engineer Professional exam. They are not real exam questions. AWS DevOps Engineer Professional and Amazon Web Services are trademarks of their owners. Real exam format: 75 questions (65 scored, 10 unscored) · 180 minutes · passing score 750 on a 100-1000 scale.