View Full Amazon AWS Certified DevOps Engineer – Professional DOP-C02 Exam Dumps and Practice Test Dumps
Question 241. Which CodePipeline feature can start a pipeline when source changes occur?
- Pipeline triggers
2. Security groups
3. CloudWatch Logs
4. IAM Access Analyzer
Correct Answer: 1. Pipeline triggers
Explanation:
CodePipeline triggers allow a pipeline execution to start automatically when defined source events occur. This supports continuous integration and delivery by reducing the need for developers or operators to manually start the pipeline after every source change. Depending on the source provider and configuration, triggers can respond to events such as changes to a branch or other supported repository activity. Automated triggering should be combined with appropriate testing and validation stages so that a source change does not automatically reach production without quality controls. Properly designed triggers help create a responsive CI/CD workflow while still allowing teams to control which repository events should initiate deployments.
Question 242. What does CodePipeline use to pass output between stages?
- Security groups
2. Artifacts
3. Route tables
4. IAM passwords
Correct Answer: 2. Artifacts
Explanation:
CodePipeline uses artifacts to transfer output from one action or stage to another during a pipeline execution. An artifact can contain source files, compiled application packages, deployment templates, configuration files, or other data required by downstream actions. For example, a CodeBuild action can produce a packaged application as an output artifact that a later CodeDeploy or CloudFormation action consumes. Artifact stores provide the underlying storage mechanism, while pipeline action configuration determines how artifacts are produced and consumed. Proper permissions and encryption should protect these artifacts because they may contain application code, deployment information, or other sensitive data used throughout the delivery process.
Question 243. Which CodeBuild setting limits how long a build can run?
- Cache mode
2. Report group
3. Timeout
4. Artifact identifier
Correct Answer: 3. Timeout
Explanation:
The CodeBuild timeout setting defines the maximum amount of time a build is allowed to run before CodeBuild terminates it. This protects CI environments from builds that become stuck because of failed commands, unavailable dependencies, infinite loops, or other unexpected conditions. The timeout should be configured according to the normal duration of the project’s build and test process. Setting it too low could terminate legitimate long-running builds, while setting it excessively high could allow failed builds to consume compute resources unnecessarily. Monitoring build duration over time can help teams choose a suitable timeout and identify changes in build performance that may require optimization.
Question 244. What does a CodeBuild report group organize?
- IAM users
2. Test reports
3. ECS capacity
4. S3 buckets
Correct Answer: 2. Test reports
Explanation:
CodeBuild report groups organize test and code coverage reports generated during build execution. A build can execute automated tests and produce results in supported report formats, which CodeBuild can associate with a report group. This provides a structured way to collect and review test outcomes across builds rather than treating every report as an isolated file. Report groups are useful in CI/CD pipelines because they help teams monitor test quality and identify failures before deployment. They can also support longer-term analysis of test results and coverage trends. Properly configured reporting makes automated testing more visible and actionable within a continuous delivery workflow.
Question 245. What does CodeArtifact provide to CI/CD workflows?
- Managed package repositories
2. EC2 instance backups
3. DNS routing
4. Container orchestration
Correct Answer: 1. Managed package repositories
Explanation:
AWS CodeArtifact provides managed repositories for software packages and dependencies used by applications and build systems. It supports common package formats and allows organizations to centralize dependencies rather than relying entirely on public package sources. CodeArtifact can be integrated with CodeBuild and other development tools so that builds retrieve approved package versions from controlled repositories. This can improve dependency management, availability, and security while providing administrators with better visibility into package usage. Organizations can also configure upstream repositories so that packages can be obtained from external sources and cached within CodeArtifact. This makes CodeArtifact useful for creating more controlled and repeatable software supply chains.
Question 246. Why use CodeArtifact upstream repositories?
- To increase Lambda concurrency
2. To cache packages from external repositories
3. To create ECS clusters
4. To configure CloudTrail
Correct Answer: 2. To cache packages from external repositories
Explanation:
CodeArtifact upstream repositories allow a CodeArtifact repository to obtain packages from another repository, including supported public package sources. When a requested package is not already available locally, CodeArtifact can retrieve it through the configured upstream relationship and make it available for subsequent use. This creates a caching layer that can reduce repeated dependency downloads from external sources. It can also provide organizations with greater control over dependency access and make builds more consistent. Teams should still establish appropriate package governance and version controls because caching a package does not automatically guarantee that the dependency is safe or suitable for production use.
Question 247. What does an ECR lifecycle policy help control?
- Removal of older or unused images
2. Lambda request routing
3. CloudFormation stack outputs
4. IAM session duration
Correct Answer: 1. Removal of older or unused images
Explanation:
Amazon ECR lifecycle policies help automatically manage the retention of container images in a repository. Organizations often accumulate many image versions as CI/CD pipelines build and publish new releases. Keeping every image indefinitely can increase storage costs and make repositories harder to manage. Lifecycle rules can identify images according to criteria such as age or image count and expire images that are no longer required. Teams should design these rules carefully so that images still needed for rollback, audit, or compliance are not removed prematurely. Lifecycle management is therefore an important part of maintaining efficient and manageable container registries in automated deployment environments.
Question 248. What does an ECR repository policy control?
- CloudWatch metric periods
2. Access to an ECR repository
3. Lambda memory allocation
4. CloudFormation drift detection
Correct Answer: 2. Access to an ECR repository
Explanation:
An Amazon ECR repository policy is a resource-based policy that controls access to a specific ECR repository. It can be used to grant permissions to AWS accounts, IAM principals, or supported AWS services according to the required access model. Repository policies are particularly useful in multi-account environments where a centralized account stores container images while workloads in other accounts need permission to pull them. Permissions should be scoped as narrowly as practical, granting only the repository actions required by the consuming workload. Repository policies work alongside IAM permissions and other AWS security controls, so the complete authorization model should be reviewed when troubleshooting or designing cross-account image access.
Question 249. What does ECS Service Auto Scaling adjust?
- Number of running tasks
2. KMS key policies
3. CloudFormation parameters
4. S3 object versions
Correct Answer: 1. Number of running tasks
Explanation:
Amazon ECS Service Auto Scaling adjusts the desired number of running tasks for an ECS service based on configured scaling policies and metrics. This allows a service to respond automatically to changing application demand. Scaling policies can use metrics such as CPU utilization, memory utilization, or custom CloudWatch metrics depending on the architecture. Increasing task count can provide additional application capacity during periods of higher demand, while reducing task count can lower resource consumption when demand decreases. Auto Scaling should be configured with suitable minimum and maximum capacity values so that the service remains responsive without consuming unnecessary resources. Health checks and deployment settings should also be considered when scaling production services.
Question 250. Which ECS setting controls how many extra tasks may run during deployment?
- Desired count
2. Maximum healthy percentage
3. Health check grace period
4. Task execution role
Correct Answer: 2. Maximum healthy percentage
Explanation:
The ECS maximum healthy percentage determines the upper limit on the percentage of the desired number of tasks that can be running during a service deployment, subject to the deployment controller and scheduling behavior. This setting influences how many additional tasks ECS can start while replacing existing tasks. A higher maximum can allow a deployment to launch replacement tasks more quickly, potentially improving deployment speed but temporarily increasing resource usage. It should be considered together with minimum healthy percentage, which controls how many tasks must remain healthy during deployment. These settings allow teams to balance availability, deployment speed, and compute capacity during rolling service updates.
Question 251. What does the ECS minimum healthy percentage influence?
- Number of KMS keys
2. Minimum healthy tasks maintained during deployment
3. Number of ECR repositories
4. CloudTrail retention
Correct Answer: 2. Minimum healthy tasks maintained during deployment
Explanation:
The ECS minimum healthy percentage controls the lower limit of healthy tasks that ECS should maintain during a rolling service deployment, expressed as a percentage of the service’s desired count. This helps determine how aggressively ECS can stop old tasks while starting new ones. A higher minimum percentage places greater emphasis on maintaining running capacity during deployment, which can reduce service disruption but may require additional compute resources. A lower percentage can permit more aggressive replacement and potentially reduce deployment duration, but it may temporarily reduce available capacity. The setting should therefore be selected based on application availability requirements and the amount of spare capacity available.
Question 252. Which ECS deployment controller supports CodeDeploy blue/green deployments?
- CODE_DEPLOY
2. EXTERNAL_ONLY
3. Route53
4. CloudFormation
Correct Answer: 1. CODE_DEPLOY
Explanation:
Amazon ECS supports deployment controllers including the ECS rolling deployment controller and the CODE_DEPLOY controller. The CODE_DEPLOY controller enables ECS services to use AWS CodeDeploy for blue/green deployment workflows. In a blue/green deployment, a new task set can be launched separately from the currently running environment, allowing traffic to be shifted under controlled conditions. This approach can support validation, gradual traffic movement, and automated rollback when integrated with appropriate monitoring. CodeDeploy can coordinate traffic shifting through the configured load balancer and deployment strategy. This provides more controlled release management than simply replacing tasks within a traditional rolling deployment.
Question 253. What does Lambda alias routing enable?
- Sending traffic between function versions
2. Creating ECR repositories
3. Encrypting CloudTrail logs
4. Scaling EC2 instances
Correct Answer: 1. Sending traffic between function versions
Explanation:
AWS Lambda aliases provide stable names that can point to specific published function versions. An alias can also use weighted routing to distribute a portion of invocation traffic between two versions. This capability supports controlled deployment strategies such as canary releases, where a small percentage of traffic is initially sent to a new version while the majority continues using the existing version. Teams can monitor errors, latency, and other metrics before increasing traffic to the new version. Aliases also help applications avoid directly referencing changing version numbers. When combined with automated alarms and deployment tooling, Lambda alias routing supports safer and more controlled function releases.
Question 254. Why publish a new Lambda function version during deployment?
- To modify an immutable published version
2. To create a stable, immutable code snapshot
3. To remove all aliases
4. To disable CloudWatch metrics
Correct Answer: 2. To create a stable, immutable code snapshot
Explanation:
Publishing a Lambda function version creates an immutable snapshot of the function code and configuration that can be referenced independently from the continuously changing unpublished $LATEST version. This is important for controlled deployments because an alias can point to a specific published version and remain stable while new code is prepared. Deployment systems can then shift traffic between published versions instead of directing production traffic to changing development code. Using versions also makes rollback easier because a previous known-good version can be selected again. This versioning model works particularly well with aliases, weighted routing, canary deployments, and automated monitoring.
Question 255. What does AppConfig’s hosted configuration store provide?
- A managed location for configuration data
2. A replacement for IAM
3. A container registry
4. An EC2 backup repository
Correct Answer: 1. A managed location for configuration data
Explanation:
AWS AppConfig provides a hosted configuration store that can hold application configuration data managed through AppConfig deployments. This allows teams to separate configuration from application code and deploy configuration changes using controlled rollout mechanisms. Applications can retrieve configuration through the AppConfig data plane according to the configured setup. Separating configuration from code can make operational changes more flexible because certain settings can be modified without rebuilding and redeploying the entire application. AppConfig can also validate configuration, use deployment strategies, and integrate with monitoring to reduce the risk of harmful configuration changes. The hosted store is therefore useful for centralized and controlled application configuration management.
Question 256. What are AppConfig extensions used for?
- Extending AppConfig workflows with additional actions
2. Increasing ECR storage
3. Replacing ECS task definitions
4. Creating IAM users
Correct Answer: 1. Extending AppConfig workflows with additional actions
Explanation:
AWS AppConfig extensions allow additional actions to be associated with AppConfig resources and lifecycle events. They can integrate configuration deployments with other AWS services or custom workflows, allowing organizations to perform extra processing before, during, or after configuration-related operations. Extensions can therefore help connect AppConfig with monitoring, notification, automation, or governance processes without requiring all integration logic to be built directly into the application. They are useful when a configuration deployment needs additional operational behavior around the standard AppConfig workflow. Proper permissions and event timing should be considered when implementing extensions so that additional actions do not unintentionally delay or interfere with configuration deployment.
Question 257. What does a CloudFormation stack output provide?
- Values that can be referenced or displayed after stack deployment
2. Automatic IAM policy creation
3. Docker image scanning
4. Lambda execution logs
Correct Answer: 1. Values that can be referenced or displayed after stack deployment
Explanation:
CloudFormation Outputs allow a stack to expose useful values after resources have been created. Outputs can contain information such as resource identifiers, endpoints, ARNs, or other values generated during deployment. These values can be displayed in the CloudFormation console and can also be referenced by other CloudFormation stacks through supported cross-stack mechanisms. Outputs are useful in automated infrastructure workflows because downstream resources or deployment processes may need identifiers created by an earlier stack. They also make infrastructure information easier for operators to discover without manually inspecting every resource. Sensitive information should generally not be placed in outputs because outputs can be visible to users with appropriate CloudFormation permissions.
Question 258. What can CloudFormation cross-stack references share?
- Exported output values
2. EC2 passwords
3. Docker daemon settings
4. CloudWatch alarms only
Correct Answer: 1. Exported output values
Explanation:
CloudFormation cross-stack references allow one stack to consume values exported by another stack. A common example is a foundational networking stack exporting a VPC or subnet identifier that application stacks then reference. This helps separate infrastructure into logical stacks while allowing dependent stacks to use resources created elsewhere. Exported values can improve reuse and reduce duplication in infrastructure as code. However, dependencies created through exports can affect how stacks are updated or deleted because an exported value cannot be removed while another stack still imports it. Teams should therefore design cross-stack dependencies carefully and avoid creating unnecessary coupling between independently managed infrastructure components.
Question 259. What does CloudFormation drift detection identify?
- Differences between template-defined and actual resource configuration
2. Slow Lambda execution
3. Missing ECR images
4. Failed CodeBuild reports
Correct Answer: 1. Differences between template-defined and actual resource configuration
Explanation:
CloudFormation drift detection helps identify whether supported stack resources have been changed outside CloudFormation in ways that cause their actual configuration to differ from the expected template or stack configuration. This is important in infrastructure-as-code environments because manual changes can create configuration drift and make the deployed environment inconsistent with the code used to manage it. Detecting drift does not automatically correct the differences. Teams must determine whether the manual change was intentional and then either update the infrastructure code or restore the expected configuration. Regular drift detection can therefore improve infrastructure consistency and help identify unauthorized or undocumented changes.
Question 260. Which practice best reduces configuration drift in automated infrastructure?
- Manual server changes
2. Infrastructure as code with controlled deployments
3. Disabling monitoring
4. Using shared administrator credentials
Correct Answer: 2. Infrastructure as code with controlled deployments
Explanation:
Infrastructure as code helps reduce configuration drift by defining infrastructure in version-controlled templates and applying changes through repeatable automated processes. Instead of allowing administrators to make undocumented modifications directly on production resources, teams can update the infrastructure definition, review the change, test it, and deploy it through controlled workflows. This creates a more consistent relationship between the declared infrastructure and the actual environment. Tools such as CloudFormation can further support drift detection and controlled updates. Strong IAM controls, change reviews, automated validation, and monitoring should complement infrastructure as code. Together, these practices make infrastructure changes more traceable, repeatable, and easier to recover or reproduce.