Courseiva

AWS Certified DevOps Engineer Professional DOP-C02 (DOP-C02) — Questions 76150

640 questions total · 9pages · All types, answers revealed

Page 1

Page 2 of 9

Page 3
76
Multi-Selectmedium

Which THREE are components of the AWS Shared Responsibility Model? (Choose THREE.)

Select 3 answers
A.AWS is responsible for patching customer applications on EC2
B.Customers are responsible for managing IAM users and permissions
C.AWS is responsible for managing customer IAM roles
D.Customers are responsible for securing their data in the cloud
E.AWS is responsible for the security of the cloud infrastructure
AnswersB, D, E

IAM is customer-managed.

Why this answer

In the AWS Shared Responsibility Model, AWS is responsible for the security of the cloud infrastructure (Option E), while customers are responsible for security in the cloud, including managing IAM users and permissions (Option B) and securing their data (Option D). Option A is incorrect because customers are responsible for patching their own applications on EC2, not AWS. Option C is incorrect because customers manage their own IAM roles, not AWS.

77
MCQmedium

A company is using AWS Lambda functions for data processing. The operations team needs to monitor the number of invocations, duration, and error counts for each function. They also want to set alarms when the error rate exceeds 5% in a 5-minute period. Which combination of AWS services should the team use to achieve this with minimal effort?

A.Use AWS CloudTrail to log Lambda invocations and configure CloudWatch alarms on the log events.
B.Enable Lambda Insights to collect detailed metrics and use CloudWatch dashboards to monitor error rates.
C.Stream Lambda logs to CloudWatch Logs and use CloudWatch Logs Insights to query error rates, then create alarms.
D.Use CloudWatch metrics published by Lambda and create a CloudWatch alarm on the ErrorCount metric with a math expression to calculate error rate.
AnswerD

Lambda emits metrics automatically; alarms can be set directly.

Why this answer

Lambda automatically publishes invocations, duration, and error metrics to CloudWatch. You can create a CloudWatch alarm with a math expression that divides the ErrorCount by the Invocations metric to calculate the error rate, then set a threshold of 5% over a 5-minute period. This requires minimal effort as the metrics are built-in.

Option A is incorrect because CloudTrail logs API calls to Lambda, not function execution metrics. Option B is incorrect because Lambda Insights is an optional feature for detailed performance monitoring, but it is not required for basic metrics and alarms. Option C is incorrect because while Lambda logs are sent to CloudWatch Logs, using Logs Insights to query error rates is more complex than using the pre-existing CloudWatch metrics; moreover, creating alarms on log events requires additional configuration and is not as straightforward as using metric math on the standard ErrorCount metric.

78
MCQmedium

An S3 bucket has the above bucket policy. What is the net effect on GetObject requests?

A.All anonymous users can read objects
B.All requests are denied
C.Only requests from IP range 192.0.2.0/24 are allowed
D.Only authenticated users can read objects
AnswerC

Deny with condition allows only that IP range.

Why this answer

The Allow statement grants public read access. The Deny statement denies all S3 actions when the source IP is not in 192.0.2.0/24. Since a Deny overrides an Allow, only requests from within that IP range are allowed.

Option C is correct.

79
MCQhard

An AWS account owner (Account A) owns an S3 bucket named my-bucket. The bucket policy shown in the exhibit is attached to the bucket. A user from Account B attempts to upload an object to the bucket without specifying the x-amz-acl header. What will happen?

A.The upload fails because the bucket policy requires the object ACL to be set, but the default ACL allows the upload anyway.
B.The upload succeeds because the bucket policy does not explicitly deny the request.
C.The upload succeeds because the bucket policy allows s3:PutObject for any principal.
D.The upload fails because the bucket policy requires the x-amz-acl header to be set to bucket-owner-full-control.
AnswerD

Without the header, the condition fails.

Why this answer

The condition requires the x-amz-acl header to be set to bucket-owner-full-control. If the header is not specified, the condition fails, and the request is denied. Option A is wrong because the condition is not met.

Option B is wrong because the policy does not grant permission without the header. Option C is wrong because the bucket policy evaluates before the object ACL.

80
MCQmedium

A DevOps engineer created the IAM policy shown in the exhibit and attached it to a user. The user tries to upload an object to my-bucket without specifying the ACL. Why does the upload fail?

A.The Effect should be Deny for this policy to work
B.The resource ARN is incorrect; it should be arn:aws:s3:::my-bucket
C.The user does not have permission to list the bucket
D.The policy condition requires the ACL to be bucket-owner-full-control, but the user did not specify it
AnswerD

The condition is not met, so the request is implicitly denied.

Why this answer

The policy condition requires the ACL to be 'bucket-owner-full-control'. If the user does not specify an ACL, the default is usually 'private', which does not satisfy the condition. Therefore the action is denied.

The resource ARN is correct. The action is allowed. The condition specifies StringEquals, which is correct for comparison.

81
MCQmedium

A company uses AWS CodePipeline with Amazon S3 as the source stage. The pipeline triggers on object creation events in the S3 bucket. The development team notices that the pipeline does not trigger when multiple files are uploaded simultaneously. What is the most likely cause?

A.Amazon S3 event notifications are not guaranteed to be delivered for bulk operations.
B.The S3 event notification filter is set to only include objects with a specific prefix or suffix that does not match the uploaded files.
C.CodePipeline does not support triggering from S3 event notifications when multiple files are uploaded simultaneously.
D.The S3 bucket versioning is not enabled, causing events to be lost.
AnswerB

Why this answer

Amazon S3 event notifications can be filtered by prefix and suffix. If the filter is configured to only match objects with a specific prefix or suffix (e.g., `images/` or `.zip`), and the uploaded files do not match that filter, the event notification will not be sent to CodePipeline, causing the pipeline not to trigger. This is the most likely cause when the pipeline fails to trigger on simultaneous uploads, as the filter configuration is a common misconfiguration.

Exam trap

The trap here is that candidates may incorrectly attribute the issue to a limitation of S3 event notifications or CodePipeline with bulk uploads, rather than recognizing that the most likely cause is a misconfigured event notification filter that excludes the uploaded files.

Why the other options are wrong

A

S3 event notifications are designed to deliver events for each object creation, though there may be occasional delays or duplicates.

C

CodePipeline supports S3 event notifications and can handle multiple triggers.

D

Versioning is not required for event notifications; events are sent regardless.

82
Multi-Selectmedium

A company is using Amazon CloudWatch to monitor its production environment. The operations team receives alerts for the same underlying issue from multiple alarms, causing alert fatigue. The team wants to reduce noise and consolidate alerts into actionable notifications. Which TWO steps should the team take? (Choose two.)

Select 2 answers
A.Configure the CloudWatch alarms to publish to an SNS topic, and use SNS subscription filter policies to route only critical notifications.
B.Use CloudWatch Evidently to run experiments and filter out false alarms.
C.Use CloudWatch composite alarms to combine multiple alarms into a single alarm that triggers only when certain conditions are met.
D.Use CloudWatch Logs Insights to query logs and create alarms based on the query results.
E.Use AWS Config rules to automatically suppress alarms that are not compliant.
AnswersA, C

SNS filter policies can reduce noise by sending only relevant messages.

Why this answer

You can configure CloudWatch alarms to publish to an SNS topic and use SNS subscription filter policies to route only critical notifications, thereby reducing noise. Option C is correct because CloudWatch composite alarms allow you to combine multiple alarms into a single alarm that triggers only when specific conditions (e.g., AND/OR logic) are met, consolidating alerts for the same underlying issue. Option B is incorrect because CloudWatch Evidently is used for running experiments and feature flags, not for alert consolidation.

Option D is incorrect because CloudWatch Logs Insights is a tool for querying log data, not for combining alarms. Option E is incorrect because AWS Config rules are designed to evaluate resource compliance, not to suppress alarms.

83
MCQeasy

A company uses AWS OpsWorks for configuration management. They need to automate the installation of a custom package on all instances in a layer. Which OpsWorks feature should they use?

A.AWS CodeDeploy AppSpec file
B.AWS CloudFormation custom resources
C.Custom Chef recipes associated with lifecycle events
D.AWS Systems Manager Run Command
AnswerC

Custom recipes run on lifecycle events like Setup to install packages.

Why this answer

Custom Chef recipes associated with lifecycle events in AWS OpsWorks allow running Chef recipes automatically on instance lifecycle events such as Setup, Configure, Deploy, Undeploy, and Shutdown. This is the correct feature for automating package installation on all instances in a layer. Option A is incorrect because AWS CodeDeploy AppSpec file is used for CodeDeploy deployments, not OpsWorks.

Option B is incorrect because AWS CloudFormation custom resources are used to extend CloudFormation templates, not for OpsWorks automation. Option D is incorrect because AWS Systems Manager Run Command is a separate service for managing instances, not OpsWorks.

84
MCQmedium

A company uses AWS OpsWorks for Chef Automate. They have a stack that includes a PHP application layer. The application requires a custom PHP configuration file. The DevOps engineer creates a custom Chef cookbook with a recipe that deploys the configuration file. The recipe is assigned to the layer's Setup lifecycle event. The engineer notices that the configuration file is not being created on new instances when they are added to the layer. The cookbook is stored in a private S3 bucket. The engineer has verified that the cookbook is correctly associated with the stack. What should the engineer do to fix the issue?

A.Assign the recipe to the Configure lifecycle event instead of Setup
B.Verify that the recipe is included in the cookbook's default.rb file
C.Update the cookbook version to the latest
D.Ensure that the instance profile has permissions to read from the S3 bucket where the cookbook is stored
AnswerD

Without S3 read access, the cookbook cannot be downloaded.

Why this answer

The issue is that the custom cookbook is stored in a private S3 bucket. For new instances to access the cookbook during the Setup lifecycle event, the instance must have the necessary IAM permissions to read from that S3 bucket. The instance profile attached to the OpsWorks stack's instances must include a policy that grants s3:GetObject for the cookbook's S3 bucket.

Without these permissions, the instance cannot download the cookbook, so the recipe never runs. Therefore, the engineer should ensure that the instance profile has permissions to read from the S3 bucket. Option A is incorrect because the Setup lifecycle event is appropriate for deploying configuration files when the instance is being set up; moving to Configure would run later and might not achieve the same result.

Option B is incorrect because the issue is not about the recipe being in default.rb; the cookbook is correctly associated, and the recipe is assigned to the layer lifecycle event directly, not necessarily via default.rb. Option C is incorrect because updating the cookbook version would not address the access permissions issue.

85
MCQmedium

A company runs a critical application on Amazon ECS with Fargate launch type. The application is deployed across multiple Availability Zones. The DevOps team needs to ensure that if an entire Availability Zone fails, the application continues to serve traffic without manual intervention. What should the team do?

A.Use an Amazon ECS service auto-scaling policy to automatically replace tasks in the failed AZ.
B.Configure the ALB to enable cross-zone load balancing and enable the ECS service's AZ rebalancing feature.
C.Configure the ECS service to run tasks in at least two Availability Zones and enable the ECS service auto-recovery feature.
D.Set the ECS service's minimum healthy percent to 100 and maximum percent to 200.
AnswerC

Multi-AZ deployment plus auto-recovery ensures resilience.

Why this answer

The ECS service's AZ rebalancing feature automatically redistributes tasks across Availability Zones when an imbalance is detected, such as after an AZ failure. By configuring the service to run tasks in at least two AZs and enabling this feature, the ECS service will automatically launch replacement tasks in the remaining healthy AZs to maintain the desired count, ensuring continued traffic serving without manual intervention.

Exam trap

The trap here is that candidates often confuse auto-scaling (which adjusts capacity based on demand) with AZ rebalancing (which redistributes tasks after an AZ failure), leading them to choose Option A or B, or they mistakenly think deployment configuration settings like minimum/maximum percent (Option D) can handle AZ failures.

How to eliminate wrong answers

Option A is wrong because ECS service auto-scaling policies adjust the desired task count based on metrics like CPU or memory, but they do not automatically replace tasks lost due to an AZ failure; they only scale based on demand, not availability. Option B is wrong because ALB cross-zone load balancing distributes traffic across all AZs but does not replace failed tasks; the ECS service's AZ rebalancing feature is the correct mechanism for task redistribution after an AZ failure. Option D is wrong because setting minimum healthy percent to 100 and maximum percent to 200 controls deployment behavior (e.g., rolling updates) but does not address AZ failure recovery; it prevents task replacement during deployments but does not trigger automatic task redistribution after an AZ outage.

86
Multi-Selecteasy

Which TWO are best practices for securing an Amazon RDS database? (Choose 2)

Select 2 answers
A.Enable public accessibility for easy management.
B.Use a single Availability Zone to reduce complexity.
C.Launch the RDS instance in a private subnet.
D.Enable encryption at rest using AWS KMS.
E.Grant direct IAM user access to the database.
AnswersC, D

Placing the database in a private subnet restricts direct internet access.

Why this answer

(launch RDS in a private subnet) and Option D (enable encryption at rest using AWS KMS) are correct best practices for securing an Amazon RDS database. Launching in a private subnet ensures the database is not directly accessible from the internet, enhancing security. Encryption at rest protects data stored on disk.

Option A is incorrect because enabling public accessibility increases exposure to attacks. Option B is incorrect because using a single Availability Zone does not enhance security and may reduce availability. Option E is incorrect because direct IAM user access to the database is not a standard practice; RDS uses database authentication, though IAM database authentication can be used, it's not a direct IAM user access and is not a best practice for all scenarios.

87
MCQeasy

A development team uses AWS CodeBuild to compile a Java application and run unit tests. The build takes 30 minutes, but the team wants to reduce build time. The codebase has not changed significantly, and dependencies are stable. Which action would be MOST effective in reducing build time?

A.Configure CodeBuild to cache dependencies in an Amazon S3 bucket.
B.Move the build process to a local developer machine to avoid CodeBuild overhead.
C.Reduce the number of unit tests executed in the build phase.
D.Increase the compute type of the build environment to a larger instance.
AnswerA

Caching avoids re-fetching dependencies every build.

Why this answer

Caching dependencies in an Amazon S3 bucket allows CodeBuild to reuse previously downloaded Maven/Gradle dependencies across builds, eliminating the need to re-download them each time. Since the codebase and dependencies are stable, this directly reduces the build time by avoiding repeated network transfers of large artifact repositories.

Exam trap

The trap here is that candidates assume a larger compute instance always speeds up builds, overlooking that network-bound operations like dependency downloads are not significantly improved by CPU or memory upgrades.

How to eliminate wrong answers

Option B is wrong because moving the build to a local developer machine sacrifices consistency, scalability, and auditability, and does not address the core issue of dependency download overhead in CodeBuild. Option C is wrong because reducing unit tests compromises code quality and test coverage, and the question states the team wants to reduce build time without changing the codebase significantly — removing tests is not a valid optimization. Option D is wrong because increasing the compute type primarily accelerates CPU-bound tasks (compilation), but the bottleneck here is likely network-bound dependency downloads; a larger instance does not reduce the time spent downloading unchanged dependencies.

88
MCQeasy

A company wants to receive real-time notifications when their Auto Scaling group launches or terminates EC2 instances. Which AWS service should they use?

A.Amazon CloudWatch alarm on the GroupTotalInstances metric.
B.AWS Config rules to detect changes in Auto Scaling groups.
C.AWS CloudTrail to monitor Auto Scaling API calls.
D.Amazon SNS notifications from the Auto Scaling group.
AnswerD

Auto Scaling can publish to SNS on instance launch/terminate.

Why this answer

Auto Scaling groups can send lifecycle notifications directly to Amazon SNS topics, enabling real-time notifications via email, SMS, or Lambda functions. Option A is wrong because the GroupTotalInstances metric is a CloudWatch metric that reflects the total number of instances, but it does not provide real-time lifecycle event notifications; CloudWatch alarms would only alert based on threshold breaches. Option B is wrong because AWS Config rules evaluate resource configurations and compliance, not real-time instance launch/terminate events.

Option C is wrong because AWS CloudTrail records API calls for auditing and governance, but it does not provide real-time event-driven notifications.

89
MCQhard

A company uses AWS Organizations to manage multiple accounts. The security team wants to ensure that no member account can disable AWS CloudTrail or delete CloudTrail logs. What is the most effective way to enforce this control?

A.Require all accounts to use the same CloudTrail trail.
B.Apply a Service Control Policy that denies cloudtrail:DeleteTrail and cloudtrail:StopLogging.
C.Create an IAM policy in each account that denies cloudtrail:DeleteTrail.
D.Configure CloudTrail to log to an S3 bucket in a centralized logging account and deny access to the bucket from member accounts.
AnswerB

SCPs are applied at the organization level and cannot be overridden by account admins.

Why this answer

A Service Control Policy (SCP) can deny the cloudtrail:DeleteTrail and cloudtrail:StopLogging actions across all accounts in the organization, effectively preventing member accounts from disabling CloudTrail or deleting logs. Option A is incorrect because requiring all accounts to use the same trail does not prevent them from disabling or deleting that trail; they could still perform those actions. Option C is incorrect because IAM policies within each account are managed by the account administrator and can be overridden, so they are not a reliable control.

Option D is incorrect because while logging to a centralized bucket helps protect logs, it does not prevent member accounts from disabling CloudTrail or deleting the trail itself in their own account; member accounts may still have permissions to modify or delete the trail.

90
MCQmedium

A company uses Amazon RDS Multi-AZ for disaster recovery. The primary DB instance in us-east-1a fails. What happens next?

A.The standby DB instance in us-east-1b is promoted automatically and the CNAME record is updated
B.The administrator must manually promote the standby instance
C.The primary instance is automatically rebuilt in the same AZ
D.A read replica in us-east-1b is automatically promoted to primary
AnswerA

RDS Multi-AZ performs automatic failover.

Why this answer

RDS Multi-AZ automatically fails over to the standby in a different Availability Zone within minutes. The CNAME record is updated to point to the standby DB instance, so no manual intervention is needed. Option A is correct because this automatic failover and CNAME update occurs.

Option B is wrong because no manual promotion is required. Option C is wrong because the primary is not rebuilt in the same AZ; it fails over to a standby in a different AZ. Option D is wrong because read replicas are not used for Multi-AZ failover; a standby instance is promoted.

91
Multi-Selecthard

A company is using AWS Lambda to process sensitive data. The security team requires that the Lambda function only be invoked from within a specific VPC and that the function's environment variables be encrypted at rest. Which TWO actions should the DevOps engineer take to meet these requirements?

Select 2 answers
A.Enable AWS KMS encryption for the Lambda function's environment variables using a customer-managed key.
B.Enable encryption for CloudWatch Logs using a KMS key.
C.Configure the Lambda function to be VPC-enabled and set up a VPC endpoint for Lambda.
D.Assign an IAM execution role with permissions to access a KMS key.
E.Attach a resource-based policy to the Lambda function that denies invoke unless the request comes from the VPC.
AnswersA, C

KMS encryption protects environment variables at rest.

Why this answer

Using a customer-managed KMS key to encrypt the Lambda function's environment variables satisfies the encryption at rest requirement. Option C is correct because configuring the Lambda function to be VPC-enabled and setting up a VPC endpoint for Lambda restricts invocation to within the specific VPC. Option B is incorrect because encrypting CloudWatch Logs does not encrypt the Lambda environment variables.

Option D is incorrect because assigning an IAM execution role with KMS permissions is necessary but not sufficient; the encryption is enabled by configuring KMS on the function. Option E is incorrect because resource-based policies cannot restrict invocation to VPC origin alone; VPC configuration and endpoints are required.

92
MCQmedium

A company uses AWS Lambda functions for data processing. The operations team notices that some functions are taking longer to execute than expected. They want to analyze the execution durations to identify functions that exceed the 75th percentile latency. Which CloudWatch feature should be used?

A.Use AWS X-Ray to trace the Lambda functions and analyze latency percentiles.
B.Use CloudWatch metrics with the percentile statistic for 'Duration'.
C.Use CloudWatch dashboards with a percentile widget on the 'Duration' metric.
D.Use CloudWatch Logs Insights to query the Lambda log groups and calculate custom percentiles using the `stats` command.
AnswerD

CloudWatch Logs Insights can parse duration from logs and calculate percentiles using the `stats` command.

Why this answer

CloudWatch Logs Insights can query Lambda log groups and use the `stats` command to compute arbitrary percentiles, such as p75, from the 'Duration' field in Lambda logs. This allows the operations team to identify functions exceeding the 75th percentile latency. Option A is incorrect because AWS X-Ray traces requests and provides latency distributions, but it does not directly compute custom percentiles from logs.

Option B is incorrect because CloudWatch metrics for Lambda's 'Duration' metric only support fixed percentiles (e.g., p50, p90, p99) and do not allow custom percentiles like p75. Option C is incorrect because CloudWatch dashboards can display percentile widgets, but they rely on metrics with precomputed percentiles and cannot calculate new percentiles from raw log data.

93
Multi-Selectmedium

A company is using Amazon CloudWatch to monitor a production environment. The DevOps team wants to receive notifications when the CPU utilization of an EC2 instance exceeds 90% for 5 consecutive minutes. Which TWO steps should the team take to achieve this? (Choose TWO.)

Select 2 answers
A.Enable detailed monitoring on the EC2 instance to get 1-minute metrics.
B.Configure an Amazon SNS topic and subscribe the team's email address to it, then set the alarm to send notifications to the SNS topic.
C.Create a CloudWatch alarm on the CPUUtilization metric with a threshold of 90% and an evaluation period of 5 consecutive minutes.
D.Create a CloudWatch Logs metric filter to count CPU utilization errors.
E.Create a CloudWatch dashboard to visualize CPU utilization.
AnswersB, C

SNS provides the notification channel for the alarm.

Why this answer

(Configure an SNS topic) and Option C (Create a CloudWatch alarm) are correct. To receive notifications when CPU utilization exceeds 90% for 5 consecutive minutes, you need a CloudWatch alarm that monitors the CPUUtilization metric with the specified threshold and evaluation period. The alarm must be configured to send notifications to an SNS topic, which then delivers the message to subscribed email addresses.

Option A (Enable detailed monitoring) is not required because the evaluation period is 5 minutes, and basic monitoring (5-minute intervals) is sufficient. Option D (Create a CloudWatch Logs metric filter) is for log data, not EC2 metrics. Option E (Create a CloudWatch dashboard) is for visualization, not notification.

94
MCQeasy

A company is using AWS CloudTrail to track API calls. They want to be notified immediately when an IAM user creates a new access key. Which combination of AWS services should be used?

A.Amazon CloudWatch Logs with a metric filter and alarm.
B.AWS Config with an AWS Lambda function.
C.Amazon CloudWatch Events (Amazon EventBridge) with an AWS Lambda function that sends an email via Amazon SES.
D.Amazon CloudWatch Events (Amazon EventBridge) with an Amazon SNS topic.
AnswerD

EventBridge can match CloudTrail events and trigger SNS for immediate notification.

Why this answer

To be notified immediately when an IAM user creates a new access key, the most efficient approach is to use Amazon CloudWatch Events (Amazon EventBridge) with an Amazon SNS topic. CloudTrail records the 'CreateAccessKey' API call as an event. An EventBridge rule can be configured to match this specific event pattern and send the event to an SNS topic, which can then send notifications via email, SMS, etc.

This provides real-time notification without additional services. Option A (CloudWatch Logs with metric filter and alarm) requires sending CloudTrail logs to CloudWatch Logs, which adds latency and complexity; it is not as direct as EventBridge. Option B (AWS Config with Lambda) is not designed for real-time event notification.

Option C (EventBridge with Lambda and SES) adds unnecessary Lambda processing since SNS can directly send email when subscribed to the topic.

95
MCQeasy

A company runs a stateless web application on EC2 instances behind an Application Load Balancer. To improve resilience, which configuration should be used for the EC2 instances?

A.Use one EC2 instance with a larger instance type
B.Use a single, large EC2 instance in one Availability Zone
C.Use multiple EC2 instances in one Availability Zone with health checks disabled
D.Use multiple EC2 instances across two or more Availability Zones
AnswerD

Provides fault tolerance across AZs.

Why this answer

D is correct because deploying multiple EC2 instances across two or more Availability Zones (AZs) ensures high availability and fault tolerance. If one AZ fails, the Application Load Balancer (ALB) automatically routes traffic to healthy instances in other AZs, maintaining service continuity. This aligns with the AWS Well-Architected Framework's resilience best practices for stateless applications.

Exam trap

The trap here is that candidates may think scaling vertically (larger instance) or using multiple instances in a single AZ is sufficient, but the DOP-C02 exam specifically tests the requirement for multi-AZ deployment to achieve resilience against AZ failures.

How to eliminate wrong answers

Option A is wrong because using a single, larger EC2 instance creates a single point of failure; if that instance fails, the entire application goes down. Option B is wrong because placing a single large instance in one AZ does not protect against AZ-level failures, such as power outages or network disruptions. Option C is wrong because using multiple instances in one AZ with health checks disabled means the ALB cannot detect and route away from failed instances, and a single AZ failure still takes down all instances.

96
MCQeasy

A DevOps engineer is troubleshooting a failed build in AWS CodeBuild. The build log shows: 'Error: Cannot find module 'lodash'.' The buildspec.yml file lists 'npm install' as a command. What is the most likely cause?

A.The npm install command is running before the source is downloaded.
B.The lodash package is not compatible with the Node.js version.
C.The package.json file is missing or does not include lodash.
D.The build environment does not have internet access to download packages.
AnswerC

npm install reads package.json; if lodash is not listed, it won't be installed.

Why this answer

The error 'Cannot find module 'lodash'' indicates that the lodash package is not installed. Since the buildspec includes 'npm install', the most likely cause is that the package.json file is missing or does not list lodash as a dependency. Without package.json or with incorrect dependencies, npm install will not install lodash, leading to the error.

97
Multi-Selecthard

A company runs a critical application on AWS Lambda functions that process real-time streaming data from Amazon Kinesis Data Streams. Each Lambda function processes a batch of records and writes results to an Amazon DynamoDB table. The application is sensitive to data loss and requires exactly-once processing semantics. Recently, the operations team observed that the Lambda function is failing intermittently with 'ProvisionedThroughputExceededException' errors from DynamoDB. The Lambda function's batch size is 100, and the function is configured with a reserved concurrency of 500. The DynamoDB table has 100 read capacity units (RCUs) and 100 write capacity units (WCUs) with auto scaling enabled up to 1000 WCUs. The function's execution role has the necessary DynamoDB permissions. The Kinesis stream has 10 shards. The DevOps engineer needs to resolve the throttling errors without losing data. Which combination of actions should the engineer take? (Choose THREE.)

Select 3 answers
A.Set the Lambda function's batch size to a lower value (e.g., 10) and enable parallelization factor per shard.
B.Increase the DynamoDB table's read capacity units to 1000.
C.Configure the Lambda function event source mapping to retry with a maximum retry count and set the function to not discard failed records.
D.Increase the Lambda function's reserved concurrency to 1000.
E.Increase the DynamoDB table's write capacity units maximum auto scaling limit to 5000.
AnswersA, C, E

Reduces the number of concurrent writes per shard, decreasing throttling.

Why this answer

Reducing the batch size decreases the number of records processed per invocation, lowering the write load on DynamoDB. Note that enabling the parallelization factor per shard increases the number of concurrent invocations per shard, which could actually increase write pressure; therefore, if used, it must be accompanied by sufficient write capacity. Option C is correct because configuring the event source mapping to retry failed records ensures that records are not lost; the Lambda function can retry after throttling errors, supporting exactly-once semantics.

Option E is correct because increasing the DynamoDB table's maximum write capacity auto scaling limit allows the table to scale to higher WCUs during bursts, reducing ProvisionedThroughputExceededExceptions. Option B is incorrect because the error is due to write capacity, not read capacity; increasing RCUs does not help. Option D is incorrect because increasing reserved concurrency would increase the number of concurrent Lambda invocations, potentially increasing writes and worsening throttling.

Exam trap

A common trap is thinking that enabling the parallelization factor per shard always reduces throttling. In reality, it increases the number of concurrent writes per shard, which can exacerbate ProvisionedThroughputExceededExceptions if DynamoDB write capacity is insufficient.

98
MCQeasy

A company wants to ensure that its Amazon S3 bucket can withstand the loss of an entire AWS Availability Zone. Which configuration meets this requirement?

A.Use the S3 Standard storage class.
B.Configure cross-Region replication to another bucket.
C.Enable S3 Versioning on the bucket.
D.Use the S3 One Zone-IA storage class.
AnswerA

S3 Standard automatically stores data in at least three AZs.

Why this answer

S3 Standard storage class automatically replicates data across at least three Availability Zones within an AWS Region, ensuring resilience against the loss of an entire AZ. Option B is incorrect because cross-Region replication replicates data to a different AWS Region, which provides geographic resilience but not specifically AZ resilience within the same Region. Option C is incorrect because S3 Versioning helps protect against accidental deletion or overwrite by preserving previous versions, but it does not provide data replication across AZs.

Option D is incorrect because S3 One Zone-IA stores data in a single AZ, which would not withstand the loss of that AZ.

99
MCQmedium

A company's application runs on Amazon ECS with Fargate launch type. The application must be resilient to an Availability Zone failure. Which configuration should be used?

A.Create an ECS service with tasks distributed across multiple Availability Zones using a spread placement strategy
B.Use an ECS cluster with a cluster placement strategy that prefers the same Availability Zone
C.Define multiple task definitions, one for each Availability Zone
D.Use an ECS service with a single task in one Availability Zone and rely on auto-scaling
AnswerA

Spread strategy across AZs ensures resilience.

Why this answer

ECS services using the Fargate launch type can distribute tasks across multiple Availability Zones (AZs) by defining a spread placement strategy with the 'availabilityZone' dimension. This ensures that if one AZ fails, the tasks in the other AZs continue to serve traffic, providing resilience to an AZ failure. The spread strategy explicitly instructs ECS to place tasks evenly across AZs, which is essential for high availability.

Exam trap

The trap here is that candidates often confuse 'spread placement strategy' with 'binpack' or 'random' strategies, or they assume that simply using multiple subnets automatically distributes tasks without explicitly setting the spread strategy.

How to eliminate wrong answers

Option B is wrong because a cluster placement strategy that prefers the same Availability Zone would concentrate tasks in a single AZ, creating a single point of failure and violating the requirement for AZ resilience. Option C is wrong because defining multiple task definitions, one for each AZ, is unnecessary and does not inherently distribute tasks across AZs; task definitions are templates for containers, not placement mechanisms, and ECS services handle AZ distribution via placement strategies. Option D is wrong because a single task in one AZ cannot provide resilience to an AZ failure—if that AZ fails, the application becomes unavailable, and auto-scaling cannot react quickly enough to prevent downtime during an AZ outage.

100
Multi-Selecthard

A company is experiencing intermittent connectivity issues between an EC2 instance and an RDS database. The EC2 instance is in a public subnet, and the RDS instance is in a private subnet. The security group for the RDS instance allows inbound traffic from the EC2 instance's security group. The network ACLs are default (all traffic allowed). Which THREE steps should the engineer take to troubleshoot the connectivity issue? (Choose THREE.)

Select 3 answers
A.Enable VPC Flow Logs for the subnets involved and analyze logs for dropped packets.
B.Check the network ACL for the private subnet to ensure it allows inbound and outbound traffic for the database port.
C.Check if the RDS security group allows inbound traffic on the database port (e.g., 3306) from the EC2 security group.
D.Verify that the EC2 instance can resolve the RDS endpoint via DNS.
E.Check the RDS security group for any deny rules that might block the EC2 instance.
AnswersA, B, C

Flow Logs can identify blocked traffic.

Why this answer

VPC Flow Logs can capture and analyze traffic to identify dropped packets between the EC2 and RDS instances. Option B is correct because even though the default NACL allows all traffic, the private subnet's NACL may have been modified; checking its inbound/outbound rules for the database port is essential. Option C is correct because the RDS security group must explicitly allow inbound traffic on the database port (e.g., 3306) from the EC2 security group.

Option D is incorrect because DNS resolution is not directly related to connectivity between the two instances; the issue is at the network/security level. Option E is incorrect because security groups only have allow rules, not deny rules; if the RDS security group already allows the EC2 security group, no deny rules exist.

101
MCQmedium

A company runs a microservices application on Amazon ECS with Fargate. The application uses an Application Load Balancer (ALB) to route traffic to services. Each service has a required number of tasks for capacity. The company recently experienced a prolonged outage when a bug caused all tasks of the critical 'payment' service to crash simultaneously. The DevOps team needs to implement a deployment strategy that reduces the risk of a full service outage during updates. The strategy must also allow for quick rollback if a deployment fails. Which deployment strategy should the team implement?

A.Implement a rolling update with a fixed number of tasks to replace at a time.
B.Use a canary deployment by creating a new service with a small number of tasks, test, then shift all traffic.
C.Deploy changes during maintenance windows with manual approval steps.
D.Implement blue/green deployment using ECS with target tracking alarms to automate traffic shifting.
AnswerD

Blue/green with automated traffic shifting and rollback capability.

Why this answer

Blue/green deployment with target tracking allows you to gradually shift traffic to the new version while monitoring. If issues arise, you can instantly rollback by switching traffic back to the old version.

102
Multi-Selecthard

A DevOps team is investigating a performance issue where an application's response time spiked during a deployment. The deployment used AWS CodeDeploy to update an Auto Scaling group. Which THREE actions should the team take to identify the root cause? (Choose THREE.)

Select 3 answers
A.Review the CodeDeploy deployment logs for errors.
B.Examine application logs on the new EC2 instances launched during the deployment.
C.Review the CodeDeploy deployment group configuration.
D.Check AWS CloudTrail for any unauthorized API calls during the deployment.
E.Compare CloudWatch metrics for the Auto Scaling group before and after the deployment.
AnswersA, B, E

Shows deployment-specific issues.

Why this answer

CodeDeploy deployment logs contain detailed information about the deployment process, including any errors or failed steps that could impact performance. Option B is correct because application logs on the new EC2 instances can reveal errors, misconfigurations, or resource contention that may have caused the spike. Option E is correct because comparing CloudWatch metrics (e.g., CPU utilization, latency, request count) before and after the deployment helps pinpoint changes that correlate with the performance issue.

Option C is wrong because reviewing the deployment group configuration—which defines how deployments occur (e.g., traffic routing, instance selection)—is unlikely to directly identify the root cause of a performance spike; it is more relevant for deployment strategy issues. Option D is wrong because AWS CloudTrail records API calls for auditing and security, not application performance; unauthorized API calls are unlikely to cause a transient performance spike during deployment.

103
Multi-Selecteasy

A company uses Amazon CloudFront to distribute content globally. Users in certain geographic regions report slow load times. Which TWO configurations can improve performance for these users? (Choose TWO.)

Select 2 answers
A.Implement Lambda@Edge to optimize content delivery.
B.Use Amazon ElastiCache to cache content.
C.Switch the origin to a Network Load Balancer.
D.Use additional CloudFront edge locations.
E.Enable S3 Transfer Acceleration on the origin bucket.
AnswersA, D

Custom logic at edge improves performance.

Why this answer

Lambda@Edge runs code at CloudFront edge locations, enabling custom processing like URL rewriting or content adaptation based on user location, which can optimize delivery. Option D is correct because selecting a CloudFront price class that includes additional edge locations (e.g., Price Class All) reduces the physical distance to users, improving load times. Option B is incorrect because ElastiCache is a database cache and does not directly enhance CloudFront distribution speed.

Option C is incorrect because a Network Load Balancer operates at Layer 4 and does not cache or accelerate content. Option E is incorrect because S3 Transfer Acceleration accelerates uploads to S3, not content delivery to end users.

104
Multi-Selectmedium

A company uses Amazon CloudWatch Logs to store application logs. They have a requirement to retain logs for 90 days for operational analysis and then archive them to Amazon S3 for compliance purposes for an additional 5 years. Which of the following steps are necessary to meet this requirement? (Select TWO.)

Select 2 answers
A.Set the CloudWatch Logs retention policy on the log group to 90 days.
B.Set an S3 lifecycle policy on the destination bucket to transition objects to Glacier after 90 days.
C.Create a CloudWatch Logs subscription filter to stream logs to Amazon S3 in real time.
D.Configure a CloudWatch Logs lifecycle policy to transition logs to Amazon S3 after 90 days.
E.Create a CloudWatch Logs export task to export logs to Amazon S3 before the retention period expires.
AnswersA, E

This ensures logs are deleted after 90 days.

Why this answer

Setting the CloudWatch Logs retention policy on the log group to 90 days ensures logs are retained for operational analysis and then automatically expire (deleted) after 90 days. Option E is correct because to archive logs to Amazon S3 for compliance, you must use a CloudWatch Logs export task to export logs to S3 before the retention period expires. Option B is incorrect because an S3 lifecycle policy applies to objects already in S3, not to logs in CloudWatch.

Option C is incorrect because subscription filters can stream logs in real time to destinations like Lambda or Kinesis, but not directly to S3 for archival. Option D is incorrect because CloudWatch Logs does not have a lifecycle policy to transition logs directly to S3; export is required.

Exam trap

Don't confuse CloudWatch Logs retention policies with S3 lifecycle policies. Retention only controls deletion from CloudWatch, not export to S3.

105
Multi-Selecteasy

Which AWS services can be used to protect a web application from common web exploits like SQL injection and cross-site scripting? (Select TWO.)

Select 2 answers
A.AWS WAF
B.AWS Shield Advanced
C.Amazon CloudFront with AWS WAF
D.Amazon Inspector
E.Amazon Cognito
AnswersA, C

WAF can inspect HTTP requests and block SQL injection and XSS.

Why this answer

AWS WAF is a web application firewall that filters malicious requests. CloudFront can be integrated with WAF to provide protection at the edge. Shield Advanced provides DDoS protection, not application-layer exploits.

Cognito is for authentication. Inspector is for vulnerability scanning.

106
Multi-Selectmedium

A company is designing a disaster recovery (DR) strategy for a critical application that runs on EC2 instances with an RDS database. The DR site must be in a different AWS Region. The Recovery Point Objective (RPO) is 15 minutes, and Recovery Time Objective (RTO) is 1 hour. Which TWO actions should the company take to meet these objectives? (Choose TWO.)

Select 2 answers
A.Use AWS Backup to copy EC2 AMIs and RDS snapshots to the DR region every 15 minutes.
B.Use AWS CloudFormation to pre-provision resources in the DR region manually.
C.Configure Amazon Route 53 with health checks and failover routing to the DR region.
D.Create an RDS cross-Region read replica in the DR region.
E.Configure S3 cross-Region replication for application data stored in S3.
AnswersC, D

Route 53 can automatically redirect traffic, meeting RTO.

Why this answer

Options C and D are correct. D: Creating an RDS cross-Region read replica in the DR region allows the replica to be promoted to the primary database with minimal data loss, meeting the 15-minute RPO. C: Configuring Amazon Route 53 with health checks and failover routing enables automatic traffic redirection to the DR region within the 1-hour RTO.

Option A is wrong because copying AMIs and RDS snapshots every 15 minutes would require launching EC2 instances and restoring the database from snapshots, which can exceed the 1-hour RTO. Option B is wrong because manually pre-provisioning resources with CloudFormation does not provide the automated failover needed to meet the RTO. Option E is wrong because S3 cross-Region replication does not address the EC2 and RDS components of the application.

107
MCQeasy

A company uses Amazon RDS for PostgreSQL and wants to monitor database performance metrics such as CPU utilization, memory, and disk I/O. Which AWS service should be used to set up custom dashboards and alarms for these metrics?

A.AWS X-Ray
B.Amazon VPC Flow Logs
C.AWS CloudTrail
D.Amazon CloudWatch
AnswerD

CloudWatch collects RDS metrics and supports dashboards and alarms.

Why this answer

Amazon CloudWatch (Option D) is the correct service for monitoring Amazon RDS performance metrics such as CPU utilization, memory, and disk I/O. CloudWatch provides built-in metrics for RDS, allows creation of custom dashboards to visualize these metrics, and supports setting alarms for proactive notifications. Option A (AWS X-Ray) is used for tracing and analyzing requests through applications, not for infrastructure metrics.

Option B (Amazon VPC Flow Logs) captures IP traffic information for network troubleshooting, not database performance. Option C (AWS CloudTrail) logs API calls for auditing, not performance monitoring. Therefore, CloudWatch is the appropriate choice for this use case.

108
Multi-Selecthard

A company runs a microservices architecture on Amazon EKS. The DevOps team wants to monitor application performance and detect anomalies in request latency. They need to collect metrics, logs, and traces from all services. Which THREE AWS services should the team use together to implement a complete observability solution? (Choose three.)

Select 3 answers
A.AWS X-Ray
B.AWS CloudWatch ServiceLens
C.AWS CloudTrail
D.Amazon Managed Service for Prometheus
E.Amazon CloudWatch Container Insights
AnswersA, B, E

Provides distributed tracing to trace requests across services.

Why this answer

Options A, B, and E are correct. AWS X-Ray (Option A) provides distributed tracing to trace requests across microservices. Amazon CloudWatch Container Insights (Option E) collects, aggregates, and summarizes metrics and logs from containerized applications on EKS.

AWS CloudWatch ServiceLens (Option B) unifies CloudWatch metrics and logs with X-Ray traces to provide a single view for observability. Option C (AWS CloudTrail) is for auditing API calls, not application performance. Option D (Amazon Managed Service for Prometheus) is a separate monitoring service but is not part of the native AWS observability stack as described; the combination of X-Ray, Container Insights, and ServiceLens provides a complete solution.

109
MCQmedium

Refer to the exhibit. An EC2 instance with the IAM role MyAppRole is running. An application on the instance tries to delete an object from the S3 bucket 'example-bucket'. What will happen?

A.The request is allowed because the instance has full access to the bucket.
B.The request is denied because the bucket policy overrides the IAM role.
C.The request is denied because the IAM role does not have the s3:DeleteObject permission.
D.The request is allowed because the role has s3:GetObject permission, which includes delete.
AnswerC

The policy only allows s3:ListBucket and s3:GetObject.

Why this answer

The IAM role MyAppRole does not include the s3:DeleteObject permission, so the request to delete an object from the S3 bucket is denied. Option A is incorrect because the role does not have full access—it only has specific permissions. Option B is incorrect because the bucket policy does not override the IAM role; both policies must allow the action for it to be permitted.

Option D is incorrect because s3:GetObject does not include the delete permission; they are separate actions.

110
MCQhard

A DevOps team is using Amazon CloudWatch Logs to collect application logs from multiple EC2 instances. They notice that some log entries are missing and that the CloudWatch agent is consuming high CPU. The log group has a retention policy of 30 days. Which action should the team take to reduce CPU usage without losing log data?

A.Increase the batch size in the CloudWatch agent configuration.
B.Use JSON format for logs instead of plain text.
C.Set the agent's timezone to UTC.
D.Change the log group retention policy to 7 days.
AnswerA

Correct: Larger batch size reduces API calls and CPU usage.

Why this answer

Increasing the batch size in the CloudWatch agent configuration reduces the number of HTTP API calls made to CloudWatch Logs, which lowers CPU overhead from frequent network I/O and serialization. The agent buffers log events and sends them in larger, less frequent batches, directly addressing high CPU consumption without discarding any log data.

Exam trap

The trap here is that candidates may confuse log retention policies with operational performance tuning, incorrectly assuming that reducing retention frees resources, when in fact it only deletes historical data and has no impact on agent CPU usage.

How to eliminate wrong answers

Option B is wrong because using JSON format instead of plain text does not reduce CPU usage; it may increase parsing overhead and does not affect the agent's batching or transmission behavior. Option C is wrong because setting the agent's timezone to UTC only affects timestamp interpretation, not CPU consumption or log delivery efficiency. Option D is wrong because reducing the log group retention policy from 30 to 7 days deletes older log data permanently, which violates the requirement to not lose log data and does not reduce CPU usage.

111
MCQmedium

An IAM policy is attached to an IAM user. The user reports that they cannot download objects from the S3 bucket 'example-bucket' even though they are connecting from within the 10.0.0.0/16 IP range. What is the MOST likely reason?

A.The policy needs an additional condition for VPC endpoint.
B.The policy does not allow the s3:ListBucket action.
C.The user is accessing S3 through a VPC endpoint, but the condition only works for public IP addresses.
D.The resource ARN is missing the bucket-level permission.
AnswerC

The aws:SourceIp condition does not work for VPC endpoint traffic; use aws:VpcSourceIp instead.

Why this answer

The condition 'aws:SourceIp' evaluates the IP address of the requester. However, if the user is accessing S3 through a VPC endpoint, the source IP is a private IP from the VPC, but the condition works only for public IP addresses. Option C is correct.

Option A is wrong because the policy allows GetObject. Option B is wrong because the resource is correct. Option D is wrong because the condition is for source IP, not VPC endpoint.

112
Multi-Selecthard

A company uses Amazon CloudWatch to monitor a fleet of EC2 instances. The DevOps team wants to receive notifications when the CPU utilization exceeds 90% for 5 minutes and also when the status check fails. Which THREE steps should be taken to set up these alerts?

Select 3 answers
A.Create a CloudWatch alarm on the CPUUtilization metric with a period of 300 seconds and threshold 90
B.Set the CPUUtilization alarm with a period of 60 seconds and 5 evaluation periods
C.Create a CloudWatch alarm on the StatusCheckFailed metric
D.Create a single composite alarm that combines both conditions
E.Create an Amazon SNS topic and subscribe the team's email addresses to it
AnswersA, C, E

300 seconds = 5 minutes, triggering on average CPU > 90%.

Why this answer

The correct steps are A, C, and E. Option A creates a CloudWatch alarm on the CPUUtilization metric with a period of 300 seconds (5 minutes) and threshold 90%, which directly meets the requirement of exceeding 90% for 5 minutes. Option C creates an alarm on the StatusCheckFailed metric to notify when EC2 status checks fail.

Option E creates an SNS topic and subscribes the team's email, which is necessary to receive notifications from the alarms. Option B is incorrect because a period of 60 seconds with 5 evaluation periods would trigger after 5 minutes only if each 1-minute period is above threshold, but the simpler and intended solution is a single period of 300 seconds. Option D is incorrect because composite alarms are not required; separate alarms for different conditions are standard practice.

113
MCQeasy

A company wants to monitor CPU utilization of its EC2 instances and receive an alert when utilization exceeds 80% for 5 consecutive minutes. Which AWS service should be used to create this alarm?

A.AWS CloudTrail
B.VPC Flow Logs
C.Amazon CloudWatch Alarms
D.AWS Config
AnswerC

CloudWatch Alarms monitor metrics and trigger actions based on thresholds.

Why this answer

Amazon CloudWatch Alarms are the appropriate service to monitor CPU utilization metrics and trigger an alert when utilization exceeds 80% for 5 consecutive minutes. CloudWatch Alarms can be set on the CPUUtilization metric of EC2 instances to take actions such as sending notifications. Option A (AWS CloudTrail) is incorrect because it logs API calls, not performance metrics.

Option B (VPC Flow Logs) captures network traffic information, not CPU usage. Option D (AWS Config) tracks resource configuration changes, not real-time utilization.

114
MCQhard

An IAM policy is attached to a role used by an operations team. The team reports that they are unable to start or stop EC2 instances tagged with Environment=Production. Other instances can be described. What is the MOST likely reason for this failure?

A.The condition key ec2:ResourceTag/Environment is not valid for ec2:StartInstances and ec2:StopInstances.
B.The role does not have permission to describe instances, so the condition cannot be evaluated.
C.The policy's Resource element is set to '*' and must be restricted to specific instance ARNs.
D.The policy does not include the ec2:RebootInstances action.
AnswerA

These actions do not support resource-level conditions; they require request-based conditions.

Why this answer

The `ec2:ResourceTag` condition key is not supported for the `ec2:StartInstances` and `ec2:StopInstances` actions in IAM policy evaluation. AWS documentation explicitly states that these actions do not support resource-level permissions based on tags; they only support the `ec2:ResourceTag` condition key for certain read-only or tagging actions. Therefore, the condition in the policy cannot be evaluated, causing the operations team to fail when attempting to start or stop Production-tagged instances.

Exam trap

The trap here is that candidates assume all EC2 actions support resource-level condition keys like `ec2:ResourceTag`, but AWS explicitly restricts tag-based conditions to specific actions, and `ec2:StartInstances` and `ec2:StopInstances` are not among them.

How to eliminate wrong answers

Option B is wrong because the team can describe other instances, indicating they have the `ec2:DescribeInstances` permission; the issue is not a lack of describe permission but the unsupported condition key. Option C is wrong because setting the Resource element to '*' is not the cause of the failure; the policy's condition key is the problem, and restricting to specific instance ARNs would not resolve the unsupported condition key issue. Option D is wrong because the `ec2:RebootInstances` action is irrelevant to the failure to start or stop instances; the missing action is not the root cause.

115
MCQhard

A company uses AWS Elastic Beanstalk for application deployments. They want to integrate infrastructure-as-code practices using AWS CloudFormation. Which approach allows them to manage the Elastic Beanstalk environment and underlying resources as part of a CloudFormation stack?

A.Use a custom resource backed by a Lambda function to create the Elastic Beanstalk environment.
B.Use the CloudFormation import feature to bring the existing Elastic Beanstalk environment into the stack.
C.Export the Elastic Beanstalk environment configuration as a CloudFormation template from the console.
D.Define the Elastic Beanstalk environment in the CloudFormation template using the AWS::ElasticBeanstalk::Environment resource.
AnswerD

CloudFormation natively supports Elastic Beanstalk.

Why this answer

CloudFormation natively supports the AWS::ElasticBeanstalk::Environment resource, allowing you to define and manage the Elastic Beanstalk environment and its underlying resources directly within a CloudFormation stack. Option A is incorrect because a custom resource backed by Lambda is unnecessary when a native resource type exists for Elastic Beanstalk environments. Option B is incorrect because the CloudFormation import feature is used to bring existing resources under stack management, but it is not the primary approach for creating new environments as part of an IaC workflow.

Option C is incorrect because while you can export an existing Elastic Beanstalk environment configuration to a CloudFormation template from the console, this is a one-time export and does not provide the same level of integration and repeatability as defining the resource directly in the template.

116
MCQmedium

A financial services company uses AWS CloudFormation to deploy a multi-tier application. The security team mandates that all data at rest must be encrypted using KMS CMKs. The CloudFormation template creates an RDS instance with encryption enabled using a KMS key. After deployment, the security team reports that the RDS instance is not using the specified KMS key. The DevOps engineer checks the template and finds the KMS Key ID is correct. What is the MOST likely cause?

A.The RDS instance was created without enabling encryption; encryption cannot be added later.
B.The KMS key is in a different AWS region.
C.The IAM role used by CloudFormation lacks permissions to use the KMS key.
D.The RDS instance is inside a VPC that does not have a KMS key policy.
AnswerA

RDS encryption can only be enabled at creation time.

Why this answer

The most likely cause is that the RDS instance was created without encryption enabled. In CloudFormation, encryption at rest for RDS requires the StorageEncrypted property to be set to true. Even if the KmsKeyId parameter is specified, if StorageEncrypted is not true, encryption is not enabled and the key ID is ignored.

Once an RDS instance is created without encryption, it cannot be enabled later. Option A correctly identifies this. Option B is less likely because cross-region KMS keys are possible but would require explicit cross-region references; the key ID being correct suggests it is in the same region.

Option C is irrelevant because if the IAM role lacked KMS permissions, the stack creation would fail rather than produce an unencrypted instance. Option D is unrelated; KMS key policies are global and not constrained by VPCs.

117
MCQeasy

A DevOps engineer is designing a CI/CD pipeline for a serverless application using AWS Lambda and Amazon API Gateway. The team wants to automate deployment across multiple environments (dev, test, prod) with environment-specific configuration. Which approach should the engineer use?

A.Use the AWS Serverless Application Model (SAM) with CodePipeline, and pass environment parameters as CloudFormation parameter overrides.
B.Use CodeBuild to package the Lambda code and then use CloudFormation with parameters for each environment.
C.Use CodeDeploy with a deployment configuration that deploys to all environments sequentially.
D.Use CodePipeline with separate CodeBuild projects for each environment.
AnswerA

SAM integrates with CodePipeline and allows parameter overrides per environment.

Why this answer

AWS SAM natively integrates with CodePipeline and allows passing environment-specific parameters as CloudFormation parameter overrides, enabling consistent and automated deployments across dev, test, and prod. Option B is less efficient as it requires manual handling of parameters in CodeBuild. Option C incorrectly relies on CodeDeploy, which is not designed for environment-specific parameters in a serverless context.

Option D introduces unnecessary complexity with separate CodeBuild projects for each environment, whereas SAM can handle all environments with parameterization.

118
Multi-Selectmedium

A company is designing a disaster recovery plan for an application running on AWS. The plan must meet an RTO of 1 hour and an RPO of 15 minutes. Which TWO strategies can achieve these objectives? (Select TWO.)

Select 2 answers
A.Backup and restore using daily snapshots to a different Region
B.Warm standby in a different AWS Region with database replication
C.Cold standby in a different Region with infrastructure deployed on demand
D.Pilot light in a different Region with database replication
E.Multi-AZ deployment in the same Region
AnswersB, D

Can meet RTO 1 hr and RPO 15 min.

Why this answer

(Warm standby) is correct because it maintains a scaled-down but fully functional copy of the production environment in a different AWS Region, with database replication (e.g., Amazon RDS cross-Region read replicas or Aurora Global Database) ensuring an RPO of 15 minutes or less. The standby infrastructure can be scaled up within the 1-hour RTO, as it is already running and configured.

Exam trap

The trap here is that candidates often confuse Multi-AZ deployments (which are high availability within a Region) with cross-Region disaster recovery, failing to recognize that Multi-AZ does not protect against a full Regional outage.

119
MCQmedium

An application running on AWS Lambda is experiencing cold starts. The team wants to monitor the cold start duration. What should they do?

A.Monitor the 'InitDuration' metric in CloudWatch for the Lambda function.
B.Use CloudWatch Logs Insights to query log groups for 'REPORT' lines and calculate duration.
C.Publish a custom metric from the Lambda code that measures initialization time.
D.Enable AWS X-Ray and trace the Lambda invocation to see cold start duration.
AnswerA

Lambda automatically reports cold start duration as InitDuration.

Why this answer

AWS Lambda automatically publishes the 'InitDuration' metric in CloudWatch for cold starts, which measures the time spent initializing the runtime and code. Option B is incorrect because while CloudWatch Logs Insights can query for 'REPORT' lines, it is more complex and unnecessary since the metric is already available. Option C is incorrect because publishing a custom metric from the Lambda code is redundant; the InitDuration metric is automatically provided.

Option D is incorrect because AWS X-Ray can trace cold starts, but the dedicated metric is simpler and directly available.

120
MCQeasy

A startup is using AWS CodeBuild to build and test their application. The build process takes about 10 minutes. Recently, they noticed that some builds are failing randomly with the error 'Could not download dependencies'. The build environment uses a custom Docker image stored in Amazon ECR. The team suspects that the issue is due to network connectivity problems when pulling the Docker image or dependencies from the internet. They want to ensure reliable and faster builds. Which solution should they implement?

A.Switch to using a public Docker image from Docker Hub
B.Increase the build timeout in CodeBuild project settings
C.Use a larger compute type for the CodeBuild project
D.Configure CodeBuild to use a VPC with a NAT gateway
AnswerD

VPC with NAT gateway provides reliable internet access for pulling images and dependencies

Why this answer

To improve reliability and speed, configure CodeBuild to use a VPC with a NAT gateway. This provides consistent internet access for pulling dependencies and Docker images, and allows using VPC endpoints for Amazon ECR, reducing network failures. Option D is correct.

Option A (using a public Docker Hub) does not address the underlying network issues and may introduce additional points of failure. Option B (increasing build timeout) does not fix the root cause of connectivity problems. Option C (using a larger compute type) does not resolve network connectivity issues.

121
Multi-Selecthard

A company is designing a disaster recovery plan for a critical application with an RPO of 15 minutes and RTO of 1 hour. The application runs on EC2 instances with an RDS MySQL database. The primary Region is us-east-1. Which THREE actions should they take to meet the RPO and RTO? (Choose three.)

Select 3 answers
A.Schedule automated AMI backups of EC2 instances every 15 minutes
B.Launch EC2 instances in a single Availability Zone in the secondary Region to reduce costs
C.Configure Route 53 health checks and DNS failover to the secondary Region
D.Create a cross-Region read replica of the RDS MySQL database in us-west-2
E.Use AWS CloudFormation StackSets to deploy identical infrastructure in the secondary Region
AnswersA, C, D

Quick recovery of EC2 instances.

Why this answer

Automated AMI backups of EC2 instances every 15 minutes align with the 15-minute RPO by capturing incremental snapshots of the instance volumes. These AMIs can be used to launch replacement EC2 instances in the secondary Region within the 1-hour RTO, provided the infrastructure is pre-staged. The frequency of 15 minutes ensures that data loss is limited to at most 15 minutes of changes.

Exam trap

The trap here is that candidates often confuse infrastructure-as-code deployment (CloudFormation StackSets) with actual data replication, mistakenly believing that deploying identical infrastructure alone satisfies the RPO, when in fact continuous database replication is required to meet the 15-minute RPO.

122
Multi-Selecteasy

A company is designing a disaster recovery strategy for its application. The application runs on EC2 instances and uses an RDS MySQL database. The RTO is 1 hour, and the RPO is 15 minutes. Which TWO approaches meet these requirements?

Select 2 answers
A.Use a warm standby strategy: run a scaled-down version of the application in the DR region with RDS Multi-AZ across regions.
B.Use a pilot light strategy: replicate data using RDS cross-region automated backups and have a small environment running in the DR region.
C.Use a read replica in the DR region and promote it on failover.
D.Use a Multi-Zone deployment with RDS in the same region.
E.Use a backup and restore strategy: take snapshots every hour and restore in the DR region on failover.
AnswersA, B

Warm standby with cross-region replication meets RPO and RTO.

Why this answer

Options A and B are correct. A warm standby with RDS Multi-AZ across regions ensures a standby database is ready and can be promoted quickly, meeting the 1-hour RTO. A pilot light with RDS cross-region automated backups provides replication with a 15-minute RPO; a small environment is running, allowing faster failover than a full pilot light.

Option C is wrong because RDS read replicas do not support automatic failover; manual promotion can take longer than 1 hour. Option D is wrong because Multi-AZ in the same region does not protect against region failure. Option E is wrong because hourly snapshots meet RPO but restoring from snapshots typically exceeds the 1-hour RTO.

123
MCQhard

A company uses AWS CodeBuild to run unit tests as part of their CI/CD pipeline. The tests are memory-intensive and occasionally fail due to insufficient memory. The buildspec.yml file uses the default compute type. What is the most cost-effective solution to resolve the memory issue?

A.Use a custom build environment with the same compute type.
B.Enable local caching in the build project to reduce disk I/O.
C.Change the build project's compute type to a larger instance (e.g., from BUILD_GENERAL1_SMALL to BUILD_GENERAL1_MEDIUM).
D.Split the tests into multiple build projects and run them in parallel.
AnswerC

Larger compute types provide more memory.

Why this answer

Increasing the compute type (e.g., from BUILD_GENERAL1_SMALL to BUILD_GENERAL1_MEDIUM) directly provides more memory for the build environment, resolving the out-of-memory failures. This is the most cost-effective solution as it only increases resources for the specific build project that needs them, without requiring architectural changes or additional build projects.

Exam trap

The trap here is that candidates may confuse memory issues with disk I/O or think that parallelizing tests will reduce per-instance memory pressure, but in reality, each parallel build runs on its own instance with the same memory limit, so the failure persists and costs increase.

How to eliminate wrong answers

Option A is wrong because using a custom build environment with the same compute type does not increase memory; it only changes the base image or installed tools, leaving the underlying instance size unchanged. Option B is wrong because enabling local caching reduces disk I/O by reusing cached files, but does not address memory constraints; the tests fail due to insufficient RAM, not disk throughput. Option D is wrong because splitting tests into multiple build projects and running them in parallel would increase total memory usage and cost, as each project runs on its own instance, and does not solve the per-instance memory shortage.

124
MCQeasy

A company runs a critical application on Amazon EC2 instances in an Auto Scaling group. To ensure high availability, the instances are deployed across three Availability Zones. Which additional step should the company take to protect against a regional failure?

A.Place all instances in a single Availability Zone to simplify management.
B.Use EC2 Dedicated Hosts to ensure capacity.
C.Increase the minimum size of the Auto Scaling group to 10 instances.
D.Deploy the application in a second AWS Region and use Route 53 with failover routing.
AnswerD

Multi-Region deployment with DNS failover protects against region failure.

Why this answer

Deploying the application in a second AWS Region and using Route 53 with failover routing protects against a regional failure by redirecting traffic to the healthy region. Option A is incorrect because placing all instances in a single Availability Zone reduces availability and does not protect against regional failure. Option B is incorrect because EC2 Dedicated Hosts provide dedicated physical servers for licensing or compliance requirements, not regional resilience.

Option C is incorrect because increasing the minimum size of the Auto Scaling group only affects capacity within the current region and does not mitigate a regional outage.

125
Multi-Selecteasy

Which TWO actions should be taken to ensure a highly available and resilient architecture for a critical web application on AWS? (Choose two.)

Select 2 answers
A.Enable Amazon CloudFront with multiple origins.
B.Use an Auto Scaling group to maintain a desired number of instances.
C.Use a Multi-AZ RDS deployment with read replicas.
D.Store backups in a different AWS Region.
E.Deploy the application across multiple Availability Zones.
AnswersB, E

Ensures capacity is maintained even if instances fail.

Why this answer

Correct: B and E. Option B ensures that the desired number of EC2 instances is maintained, providing automatic scaling and fault tolerance. Option E deploys the application across multiple Availability Zones, which protects against an AZ failure.

Option A (CloudFront) enhances content delivery but does not directly ensure high availability of the web application. Option C (Multi-AZ RDS with read replicas) improves read performance and provides disaster recovery, but write availability depends on the primary instance. Option D (backups in a different region) is for disaster recovery, not for immediate availability.

126
Multi-Selecteasy

A company wants to protect its AWS account credentials. Which TWO practices are recommended by AWS? (Choose TWO.)

Select 2 answers
A.Generate and share access keys for all users.
B.Store IAM user passwords in a shared document.
C.Enable multi-factor authentication (MFA) for privileged users.
D.Use the root user for daily administrative tasks.
E.Use IAM roles for applications that require AWS access.
AnswersC, E

Adds security.

Why this answer

Enabling multi-factor authentication (MFA) adds an extra layer of security beyond a password, which is especially important for privileged users. Option E is correct because IAM roles provide temporary credentials for applications, eliminating the need to store long-term access keys and reducing security risks. Option A is incorrect because access keys should not be shared; each user should have their own keys and they should be rotated regularly.

Option B is incorrect because storing IAM user passwords in a shared document violates security best practices and increases the risk of unauthorized access. Option D is incorrect because using the root user for daily administrative tasks is dangerous; the root user should be used only for limited, high-privilege tasks, and otherwise should be protected with MFA and not used for routine operations.

127
Multi-Selectmedium

A company is designing a highly available architecture for a web application using AWS services. The application must be resilient to the failure of an entire AWS Region. Which TWO strategies should the company implement? (Choose TWO.)

Select 2 answers
A.Deploy the application in multiple AWS Regions and use Route 53 with failover routing policy.
B.Use Amazon CloudFront with multiple origins in the same region.
C.Enable S3 cross-Region replication for static assets.
D.Configure Amazon RDS for Multi-AZ and enable cross-Region read replicas.
E.Use Auto Scaling groups in a single region with multiple Availability Zones.
AnswersA, D

Multi-Region deployment with DNS failover is a key strategy for regional resilience.

Why this answer

Deploying to multiple regions with Route 53 failover provides cross-region disaster recovery. Option D is correct because using Amazon RDS Multi-AZ with cross-Region read replicas or Aurora Global Database ensures database resilience across regions. Option B is wrong because CloudFront alone does not provide compute failover.

Option C is wrong because S3 cross-Region replication is for data, not compute. Option E is wrong because single-region Auto Scaling does not protect against region failure.

128
MCQeasy

A company wants to receive notifications when an EC2 instance's CPU utilization exceeds 90% for 10 consecutive minutes. Which AWS service should be used?

A.Amazon CloudWatch alarm
B.AWS Config rule
C.AWS CloudTrail event
D.Amazon Inspector
AnswerA

CloudWatch alarms can trigger SNS notifications on metric thresholds.

Why this answer

Amazon CloudWatch alarms monitor specified metrics (like CPU utilization) and trigger actions (e.g., SNS notification) when a threshold is breached for a given period. Option A is correct. Option B is incorrect because AWS Config rules evaluate configuration compliance, not metric thresholds.

Option C is incorrect because AWS CloudTrail records API activity, not metric monitoring. Option D is incorrect because Amazon Inspector assesses security vulnerabilities, not performance metrics.

129
MCQeasy

A company uses AWS OpsWorks for configuration management. The DevOps team wants to deploy a new application version to a stack of EC2 instances. What should the team use to perform the deployment?

A.AWS Elastic Beanstalk
B.AWS CloudFormation
C.AWS CodeDeploy
D.Custom Chef recipes in OpsWorks
AnswerD

OpsWorks uses Chef recipes for configuration and deployment.

Why this answer

AWS OpsWorks is a configuration management service that uses Chef. When you need to deploy a new application version to a stack of EC2 instances managed by OpsWorks, the native and recommended approach is to use custom Chef recipes. These recipes can be executed as a lifecycle event (e.g., Deploy) to update application code, restart services, or perform any deployment tasks directly on the instances, leveraging the existing OpsWorks agent and Chef infrastructure.

Exam trap

The trap here is that candidates often confuse OpsWorks with Elastic Beanstalk or think that CodeDeploy is the universal deployment tool for all EC2 instances, forgetting that OpsWorks has its own native Chef-based deployment mechanism that should be used when the stack is already managed by OpsWorks.

How to eliminate wrong answers

Option A is wrong because AWS Elastic Beanstalk is a PaaS service for deploying web applications, not a deployment tool for existing OpsWorks stacks; it manages its own EC2 instances and cannot target an OpsWorks stack. Option B is wrong because AWS CloudFormation is an Infrastructure as Code (IaC) service for provisioning and managing AWS resources, not for deploying application code to running instances; it can create the stack but not perform the application deployment within OpsWorks. Option C is wrong because AWS CodeDeploy is a separate deployment service that can deploy to EC2 instances, but it is not integrated with OpsWorks lifecycle events; using it would bypass OpsWorks' built-in Chef-based deployment mechanism and require additional setup, making it non-idiomatic for an OpsWorks-managed environment.

130
MCQmedium

A company is running a critical web application on Amazon EC2 instances behind an Application Load Balancer (ALB) with Auto Scaling. The operations team notices that the application's error rate spiked for 10 minutes last night, but no CloudWatch alarm was triggered. The team has a CloudWatch alarm on the ALB's 'HTTPCode_Target_5XX_Count' metric with a threshold of 100 over 5 consecutive periods of 1 minute. What is the MOST likely reason the alarm did not trigger?

A.The ALB publishes metrics only at 5-minute granularity.
B.The ALB sends metrics to CloudWatch Logs instead of CloudWatch Metrics.
C.The alarm's period is set to 5 minutes instead of 1 minute.
D.The alarm is configured on the wrong metric namespace.
AnswerC

If the period is 5 minutes, the alarm would require data over 25 minutes to trigger, missing the 10-minute spike.

Why this answer

The alarm is configured to evaluate 'HTTPCode_Target_5XX_Count' over 5 consecutive periods of 1 minute, meaning it requires 5 minutes of data above the threshold to trigger. The spike lasted 10 minutes, which should have met this condition. However, if the alarm's period is set to 5 minutes instead of 1 minute, the alarm would evaluate 5 consecutive periods of 5 minutes each, requiring 25 minutes of sustained errors.

A 10-minute spike would not be enough to trigger the alarm. Therefore, option C is correct. Option A is incorrect because ALB metrics are published at 1-minute granularity.

Option B is incorrect because ALB sends metrics to CloudWatch Metrics, not CloudWatch Logs. Option D is incorrect because the metric 'HTTPCode_Target_5XX_Count' is in the correct namespace (AWS/ApplicationELB) and is specific to target groups.

131
MCQhard

A company uses AWS CodeDeploy to deploy applications to an Auto Scaling group. During a deployment, the new instances fail the health check and are terminated. The deployment fails. The team wants to automatically roll back to the previous working version. What should they do?

A.Set up an Auto Scaling lifecycle hook to terminate instances and trigger a rollback.
B.Configure the deployment group to automatically roll back when a deployment fails.
C.Manually redeploy the last successful deployment revision after investigating the failure.
D.Configure the deployment group to automatically redeploy the same revision on failure.
AnswerB

CodeDeploy can automatically roll back to the last known good revision.

Why this answer

AWS CodeDeploy provides a built-in rollback configuration that can be triggered automatically when a deployment fails. By enabling automatic rollback in the deployment group settings, CodeDeploy will redeploy the last successful revision when the current deployment fails health checks, without requiring manual intervention or additional infrastructure.

Exam trap

The trap here is that candidates may confuse Auto Scaling lifecycle hooks with CodeDeploy rollback mechanisms, or think that redeploying the same revision (option D) would fix the issue, when in fact it would just repeat the failure.

How to eliminate wrong answers

Option A is wrong because Auto Scaling lifecycle hooks are used to perform custom actions during instance launch or termination (e.g., draining connections or running scripts), but they do not trigger CodeDeploy rollbacks; rollback logic must be configured within CodeDeploy itself. Option C is wrong because manually redeploying the last successful revision is a valid recovery method but does not meet the requirement for automatic rollback; the team wants an automated solution, not manual steps. Option D is wrong because redeploying the same revision on failure would repeat the same failing deployment, not restore the previous working version; automatic rollback specifically redeploys the last known good revision, not the failed one.

132
Multi-Selecthard

During a security incident, a DevOps engineer discovers that an EC2 instance has been compromised. The instance has an IAM role with permissions to access S3 and DynamoDB. Which THREE immediate actions should the engineer take to contain the incident?

Select 3 answers
A.Terminate the instance immediately
B.Create an AMI of the instance for forensic analysis
C.Stop the EC2 instance
D.Update the security group to deny all inbound and outbound traffic
E.Remove the IAM role from the instance
AnswersC, D, E

Stopping the instance halts any malicious processes.

Why this answer

To contain the incident, immediate actions should focus on isolating the instance and revoking its permissions to prevent further damage. Stopping the instance (C) preserves its state for later forensics while halting current malicious activity. Updating the security group (D) blocks all network traffic to and from the instance, cutting off communication.

Removing the IAM role (E) revokes the instance's access to S3 and DynamoDB, preventing data exfiltration or unauthorized actions. Terminating the instance (A) is not recommended because it destroys volatile data and evidence, hindering investigation. Creating an AMI (B) is a forensic step that should be done after containment; it does not immediately stop the compromise.

133
MCQmedium

A company is using AWS CodeBuild to run integration tests. The tests require access to an Amazon RDS instance in a private subnet. The CodeBuild project is configured with a VPC ID, subnet IDs, and security group IDs. However, the tests fail with a connection timeout. What is the MOST likely cause?

A.The security group attached to the RDS instance does not allow inbound traffic from the CodeBuild security group.
B.The CodeBuild project does not have internet access to download packages.
C.The CodeBuild project is not associated with a VPC.
D.The RDS instance is not publicly accessible and requires a NAT gateway.
AnswerA

Security group rules must allow traffic on the database port from the CodeBuild security group.

Why this answer

The most likely cause is that the security group attached to the RDS instance does not allow inbound traffic from the CodeBuild security group. CodeBuild runs inside the VPC using the specified security group, so it sends traffic to the RDS instance on port 3306 (or the appropriate database port). If the RDS security group's inbound rules do not explicitly permit traffic from the CodeBuild security group (or its CIDR), the connection is dropped, resulting in a timeout.

Exam trap

The trap here is that candidates often assume a NAT gateway or internet access is required for VPC-based resources, but the core issue is security group ingress rules, not network connectivity to the internet.

How to eliminate wrong answers

Option B is wrong because CodeBuild projects configured with a VPC can access the internet via a NAT gateway or VPC endpoints if needed, but the failure here is a connection timeout to RDS, not a package download issue. Option C is wrong because the question states the CodeBuild project is configured with a VPC ID, subnet IDs, and security group IDs, so it is associated with a VPC. Option D is wrong because RDS instances in private subnets do not need to be publicly accessible; CodeBuild can reach them directly via the VPC without a NAT gateway, as long as security group rules and network ACLs permit the traffic.

134
Multi-Selecteasy

A DevOps engineer is troubleshooting a failed deployment. The engineer needs to identify the root cause. Which TWO AWS services can provide information about the deployment events and errors? (Choose two.)

Select 2 answers
A.AWS CloudTrail
B.AWS Trusted Advisor
C.AWS Service Catalog
D.Amazon Inspector
E.AWS Config
AnswersA, E

CloudTrail records API calls like CreateStack, UpdateStack, etc.

Why this answer

AWS CloudTrail records API calls made in your account, including deployment actions such as those from CodeDeploy, CloudFormation, or Elastic Beanstalk. It provides event history for troubleshooting failed deployments by showing who made what call and when. AWS Config tracks configuration changes to AWS resources, including deployment-related changes.

It can show the state of resources before and after a deployment, helping identify misconfigurations that caused the failure. The other options are incorrect: AWS Trusted Advisor offers best-practice checks and cost optimization recommendations, not deployment event logging. AWS Service Catalog manages approved IT services and product portfolios, not deployment events.

Amazon Inspector is a vulnerability assessment service for security, not deployment troubleshooting.

135
MCQhard

A company runs a critical web application on AWS using an Auto Scaling group of EC2 instances behind an Application Load Balancer. The application is deployed using AWS CodeDeploy with a blue/green deployment configuration. The DevOps team is responsible for configuration management using AWS Systems Manager State Manager. They have set up a State Manager association to ensure that the instances have a specific security configuration (e.g., firewall rules). Recently, after a new deployment, the team noticed that the security configuration is missing on some new instances. The old instances still have the correct configuration. The association is configured to apply the configuration only at instance launch (using the AWS-RunShellScript document). The team suspects that the new instances are not being targeted by the association. Upon investigation, they find that the association is set to target instances based on tags, and the new instances do have the required tags. However, the association status shows 'Success' for the old instances but no status for the new instances. Which of the following is the MOST likely cause of this issue?

A.The State Manager association was created before the new instances were launched, and the association is not configured to automatically apply to new instances. The association needs to be updated or scheduled to run periodically.
B.The new instances have a different tag than the one specified in the association.
C.The association is trying to download a script from an S3 bucket, but the bucket policy denies access to new instances.
D.The AWS-RunShellScript document failed to execute on the new instances due to a missing IAM role.
AnswerA

Associations only apply to instances that exist at the time of association creation unless configured otherwise.

Why this answer

State Manager associations are created at a specific time and target instances that exist at that time. New instances launched after the association creation will not automatically be targeted unless the association is configured with a schedule or the 'Apply only at next update' option. The association is set to run only at launch, but the association itself must be applied to the instance at launch time.

If the association was created before the new instances, it won't apply to them unless it is updated. Option B is wrong because the association can target instances by tags; tagging is not the issue. Option C is wrong because the problem is not about the script failing; the association is not running on new instances.

Option D is wrong because the S3 bucket policy would affect the ability to store logs, but the association status would show error, not missing status.

136
Multi-Selectmedium

A company uses Amazon CloudWatch for monitoring. The operations team wants to receive an alert when an EC2 instance's status check fails for 2 consecutive minutes. Which THREE resources should the team configure? (Choose three.)

Select 3 answers
A.CloudWatch Events rule
B.CloudWatch Logs
C.CloudWatch alarm
D.EC2 StatusCheckFailed metric
E.Amazon SNS topic
AnswersC, D, E

Alarm monitors the metric and triggers actions.

Why this answer

To alert when an EC2 instance's status check fails for 2 consecutive minutes, you need to create a CloudWatch alarm on the StatusCheckFailed metric (options C and D). The alarm needs to send notifications via an SNS topic (option E). Option A (CloudWatch Events rule) is not used for metric-based alerts; CloudWatch Events triggers on events or schedules, not metric thresholds.

Option B (CloudWatch Logs) is for log data, not metrics.

Exam trap

A common trap is confusing CloudWatch Events with CloudWatch Alarms. CloudWatch Events are for event-driven actions based on state changes or schedules, not for monitoring metric thresholds over time. Metric alarms require the CloudWatch Alarm resource.

137
Multi-Selectmedium

A company uses AWS Lambda with an Amazon DynamoDB trigger. Recently, the Lambda function started failing with 'ProvisionedThroughputExceededException' errors. The DevOps team needs to mitigate the issue. Which TWO actions should the team take? (Choose TWO.)

Select 2 answers
A.Increase the Lambda function's reserved concurrency
B.Disable DynamoDB Streams on the table
C.Enable DynamoDB Accelerator (DAX) for the table
D.Increase the DynamoDB table's write capacity
E.Reduce the batch size for the DynamoDB stream event source mapping
AnswersD, E

More capacity reduces throttling.

Why this answer

To mitigate 'ProvisionedThroughputExceededException' errors when a Lambda function is triggered by DynamoDB Streams, two actions are effective. Option D: Increase the DynamoDB table's write capacity to handle the write demand from the stream processing. Option E: Reduce the batch size for the DynamoDB stream event source mapping to lower the number of writes per invocation, reducing the chance of exceeding throughput.

Option A is wrong because Lambda reserved concurrency controls how many concurrent executions Lambda can run, but the issue is DynamoDB throttling, not Lambda capacity. Option B is wrong because disabling DynamoDB Streams would stop the trigger entirely, which is not a mitigation. Option C is wrong because DynamoDB Accelerator (DAX) is an in-memory cache for reads, not writes, and does not affect write throughput.

138
MCQmedium

Refer to the exhibit. A DevOps engineer checks the CloudWatch alarm configuration and state. The alarm is in ALARM state for CPUUtilization averaging 90% over 5 minutes, but no notification was received. What is the most likely reason?

A.The SNS topic does not have any confirmed subscriptions.
B.The EC2 instance is stopped.
C.The alarm period is set to 300 seconds, which is too long.
D.The alarm has insufficient data to evaluate.
AnswerA

Without confirmed subscriptions, notifications are not sent.

Why this answer

The alarm is in ALARM state, indicating that CPUUtilization exceeded the threshold, and data is present. However, no notification was received because the SNS topic specified in the alarm actions likely has no confirmed subscriptions. For SNS to deliver a notification (e.g., email), each subscription must be confirmed by the recipient; otherwise, messages are not sent.

Exam trap

Even if an SNS topic ARN is correctly configured in alarm actions, notifications will not be sent unless at least one subscription is confirmed. Candidates may overlook the importance of confirming SNS subscriptions.

139
Multi-Selecteasy

Which TWO AWS services can be used to manage and rotate database credentials automatically? (Select TWO.)

Select 2 answers
A.AWS Systems Manager Parameter Store
B.AWS Secrets Manager
C.AWS CloudFormation
D.AWS KMS
E.AWS IAM
AnswersA, B

Can store secrets and with custom Lambda can rotate.

Why this answer

Options A and B are correct. AWS Systems Manager Parameter Store can store database credentials as SecureString parameters, and you can implement automatic rotation using a custom AWS Lambda function. AWS Secrets Manager provides built-in automatic rotation for supported databases (e.g., Amazon RDS, Amazon Redshift) without requiring custom code.

Option C (AWS CloudFormation) is an infrastructure-as-code service and does not manage or rotate credentials. Option D (AWS KMS) is a key management service that encrypts data but does not handle credential rotation. Option E (AWS IAM) manages access permissions and roles, not database credentials.

140
MCQeasy

A company uses AWS Lambda for processing events from Amazon S3. Recently, the Lambda function started timing out after the 15-minute limit for some large files. The function downloads the entire file to /tmp before processing. What should a DevOps engineer do to resolve this issue with minimal code changes?

A.Use S3 Select to filter and retrieve only necessary data, reducing file size
B.Switch the Lambda runtime from Python to Node.js for faster execution
C.Increase the Lambda function memory to 10,240 MB to improve CPU performance
D.Modify the function to read the file in streaming chunks from S3
AnswerA

S3 Select allows retrieving only required columns, reducing data transfer and processing time.

Why this answer

S3 Select allows querying only the necessary data from S3, reducing the amount of data the Lambda function must download and process. This directly addresses the timeout issue by minimizing the data handled, requiring no major architectural changes. Option B is wrong because switching to Node.js does not remove the 15-minute Lambda timeout.

Option C is wrong because increasing memory does not extend the maximum execution time. Option D is wrong because streaming the file does not by itself reduce the total data to process; it only might start processing earlier, but the total processing time still may exceed the timeout.

141
MCQmedium

A company runs a critical web application on EC2 instances behind an Application Load Balancer (ALB) with Auto Scaling. During a recent traffic spike, the application became unavailable for 10 minutes. Analysis shows that the ALB's healthy host count dropped to zero because the instances failed health checks due to high CPU load. What is the MOST effective design change to improve resilience during future traffic spikes?

A.Use predictive scaling with a scheduled scaling policy for known peak times.
B.Increase the instance size to handle higher load.
C.Configure step scaling policies based on CPU utilization.
D.Set a higher CPU threshold for health checks.
AnswerA

Predictive scaling anticipates demand and scales out in advance, preventing overload.

Why this answer

Predictive scaling uses historical traffic data to forecast future demand and proactively adjust capacity before a spike occurs. This prevents the CPU from reaching critical levels that cause health check failures, ensuring the ALB always has healthy hosts. Scheduled scaling alone would not adapt to unexpected spikes, but predictive scaling combined with dynamic scaling provides both proactive and reactive resilience.

Exam trap

The trap here is that candidates confuse reactive scaling (step/target tracking) with proactive scaling (predictive/scheduled), assuming any CPU-based policy will suffice, but the question explicitly states the spike caused a drop to zero healthy hosts—meaning reactive scaling was too slow to prevent the outage.

How to eliminate wrong answers

Option B is wrong because simply increasing instance size (vertical scaling) is a single-point-of-failure approach and does not address the root cause of insufficient capacity during spikes; it also increases cost without improving elasticity. Option C is wrong because step scaling policies based on CPU utilization are reactive—they only add instances after CPU is already high, which can lead to a lag that causes health check failures during rapid spikes. Option D is wrong because raising the CPU threshold for health checks masks the underlying performance issue and risks allowing unhealthy instances to serve traffic, degrading user experience and potentially causing cascading failures.

142
MCQmedium

A DevOps engineer receives an alert that an EC2 instance has been compromised. The instance is part of an Auto Scaling group. What is the first step the engineer should take to isolate the instance?

A.Create a snapshot of the instance's root volume
B.Detach the instance from the Auto Scaling group and remove it from the load balancer
C.Create an AMI of the instance for analysis
D.Terminate the instance immediately
AnswerB

Isolates the instance by stopping traffic and decoupling from ASG.

Why this answer

The first step to isolate a compromised EC2 instance in an Auto Scaling group is to detach it from the Auto Scaling group and remove it from the load balancer. This stops all incoming traffic to the instance, preventing further damage or data exfiltration while preserving the instance for forensic analysis. Option A (snapshot) is useful for preserving evidence but does not isolate the instance.

Option C (AMI) similarly does not provide immediate isolation. Option D (terminate) may destroy evidence and should only be done after investigation.

143
MCQeasy

A company uses Amazon CloudFront to serve static content from an S3 bucket. Users report that they see outdated content even after the engineer has updated the files in the S3 bucket. What should the engineer do to ensure users see the latest content?

A.Create an invalidation for the updated file paths.
B.Change the S3 bucket policy to allow public access.
C.Reduce the TTL for the CloudFront distribution.
D.Delete and recreate the CloudFront distribution.
AnswerA

Invalidation removes cached content, forcing CloudFront to fetch the latest from origin.

Why this answer

Creating a CloudFront invalidation for the specific file paths forces the edge locations to fetch the updated content from the S3 origin immediately, ensuring users see the latest files. Option B is incorrect because changing the bucket policy to allow public access does not affect CloudFront's cache; it only controls direct access to the bucket. Option C is incorrect because reducing the TTL affects how long new content is cached but does not clear already-cached outdated content.

Option D is incorrect because deleting and recreating the distribution is an overly disruptive solution; a simple invalidation suffices.

144
MCQeasy

A DevOps engineer receives a CloudWatch alarm that an EC2 instance's CPU utilization has exceeded 90% for 10 minutes. The instance hosts a critical web application. What is the MOST appropriate immediate response to mitigate performance impact?

A.Reboot the EC2 instance to clear any temporary processes.
B.Place the instance into an Auto Scaling group with a scale-out policy based on CPU utilization.
C.Create a new AMI from the instance and launch a new larger instance.
D.Stop the instance and change its type to a larger instance size.
AnswerB

Auto Scaling can automatically launch new instances to distribute the load.

Why this answer

Placing the instance into an Auto Scaling group with a scale-out policy based on CPU utilization allows the group to launch additional instances to handle the increased load, providing immediate mitigation without downtime. Rebooting (A) causes downtime and does not resolve the root cause. Creating a new AMI and launching a larger instance (C) or stopping and resizing (D) both involve significant downtime and are not immediate.

Therefore, B is the best immediate response.

145
Multi-Selecthard

Which TWO are correct about using AWS CloudFormation to manage infrastructure across multiple AWS accounts? (Select TWO.)

Select 2 answers
A.You can use AWS Organizations to centrally manage accounts and use StackSets with trusted access.
B.CloudFormation can automatically create new AWS accounts using a template.
C.Nested stacks can be used to deploy resources in different accounts from a single template.
D.AWS CloudFormation StackSets can deploy stacks across multiple accounts.
E.You can use cross-stack references to share resources between accounts.
AnswersA, D

Organizations integration enables StackSets across accounts.

Why this answer

AWS Organizations can centrally manage accounts, and StackSets can be enabled with trusted access to deploy stacks across accounts. Option D is correct because AWS CloudFormation StackSets allow deploying stacks across multiple accounts. Option B is incorrect because CloudFormation cannot automatically create new AWS accounts.

Option C is incorrect because nested stacks operate within a single stack and cannot deploy resources across different accounts from a single template. Option E is incorrect because cross-stack references only work within the same account and region.

146
MCQeasy

An application running on Amazon EC2 instances behind an Application Load Balancer (ALB) is experiencing intermittent 503 errors. The target group health checks are failing. The DevOps engineer checks the instance logs and finds that the application is running but taking longer than 30 seconds to respond. What is the MOST likely cause?

A.The Auto Scaling group's scaling policy is too aggressive, causing frequent instance replacements.
B.The security group for the ALB does not allow inbound traffic from the internet.
C.The health check timeout is set too low, causing the ALB to mark instances unhealthy.
D.The EC2 instances are running out of memory and the application is crashing.
AnswerC

If the application responds slowly, health checks may timeout.

Why this answer

The ALB health check timeout is configured to a value less than 30 seconds, causing the health check to fail before the application responds. This results in the target group marking instances as unhealthy and returning 503 errors. Option A is incorrect because aggressive scaling would cause instance replacements but not directly 503 errors.

Option B is incorrect because security group rules affect connectivity, not health check timeouts. Option D is incorrect because the application is still running, albeit slowly, not crashing.

147
MCQmedium

An organization uses AWS CodeCommit to store CloudFormation templates. They have a requirement that all templates must pass a series of validation checks before being merged to the main branch. The checks include syntax validation, IAM policy linting, and compliance rules. The DevOps team wants to implement this validation using AWS services with minimal operational overhead. They already use AWS CodePipeline for CI/CD. What should the team do?

A.Configure a CloudFormation stack to automatically validate templates and send notifications.
B.Create a Lambda function that triggers on CodeCommit events and runs validation.
C.Use AWS CloudFormation Guard as a pre-commit hook on local machines.
D.Set up a CodePipeline that is triggered by pull request creation, with a CodeBuild stage to run validation checks, and configure a branch policy to require the pipeline to succeed before merging.
AnswerD

This provides automated, centralized validation with minimal overhead.

Why this answer

CodePipeline with CodeBuild can run validation checks on pull requests using a branch policy. Option A is wrong because it requires managing Lambda functions. Option B is wrong because it doesn't integrate with pull request workflow.

Option C is wrong because CloudFormation alone cannot enforce pre-merge validation.

148
MCQmedium

A company runs a web application on EC2 instances behind an Application Load Balancer (ALB). The security team requires that all traffic to the ALB must be encrypted (HTTPS) and that the ALB must only accept traffic from CloudFront. The DevOps engineer has configured CloudFront with an origin pointing to the ALB, and the ALB has a listener on port 443 with a valid SSL certificate. The engineer also added a security group rule to the ALB that allows HTTPS traffic only from CloudFront's IP ranges. However, users are reporting intermittent 503 errors. The engineer checks CloudFront logs and sees that some requests are failing with 'Origin Connect Error'. What is the most likely cause?

A.The ALB has a Web Application Firewall (WAF) that is blocking requests from CloudFront.
B.The security group rule is using an outdated list of CloudFront IP ranges, and CloudFront has added new IP ranges that are being blocked.
C.The SSL certificate on the ALB is not trusted by CloudFront, causing handshake failures.
D.The ALB idle timeout is set too low, causing CloudFront to close connections prematurely.
AnswerB

Correct. The security group rule using an outdated list of CloudFront IP ranges can cause intermittent 503 errors when CloudFront adds new IPs that are blocked.

Why this answer

The most likely cause is that the security group rule is using an outdated list of CloudFront IP ranges. CloudFront's IP ranges are dynamic and change over time; AWS publishes these ranges but they are not static. When a new range is added that is not in the security group rule, requests from those IPs are blocked, leading to 'Origin Connect Error' and intermittent 503 errors.

The correct approach is to use a custom header (e.g., X-Origin-Verify) from CloudFront and validate it at the ALB, rather than relying on IP-based security groups. Option A (WAF blocking) would typically result in 403 Forbidden, not 503. Option C (SSL certificate) would cause handshake failures with a different error.

Option D (idle timeout) would cause consistent timeout errors, not intermittent ones.

149
Multi-Selecthard

A company uses AWS Organizations with multiple accounts. The security team needs to ensure that all CloudTrail trails across the organization are delivering events to a centralized S3 bucket in the management account. Currently, some member accounts have their own trails. Which THREE steps should the security team take to enforce this? (Choose three.)

Select 3 answers
A.Manually disable CloudTrail in each member account.
B.Create an organization trail in the management account that applies to all accounts.
C.Use AWS Config rules to detect non-compliant trails and trigger automatic remediation.
D.Enable CloudTrail on the centralized S3 bucket to log access.
E.Use a service control policy (SCP) to deny the 'cloudtrail:CreateTrail' and 'cloudtrail:UpdateTrail' actions.
AnswersB, C, E

Correct: Creating an organization trail in the management account automatically applies to all accounts and delivers events to the central S3 bucket.

Why this answer

Creating an organization trail in the management account automatically applies to all accounts and delivers events to the specified S3 bucket. Option C is correct because AWS Config rules can detect non-compliant trails (e.g., trails not delivering to the central bucket) and trigger automatic remediation, such as disabling the non-compliant trail or applying a fix. Option E is correct because an SCP that denies 'cloudtrail:CreateTrail' and 'cloudtrail:UpdateTrail' prevents member accounts from creating or modifying their own trails, enforcing the use of the organization trail.

Option A is incorrect because manually disabling CloudTrail in each member account is not scalable and does not prevent future trails. Option D is incorrect because enabling CloudTrail on the centralized S3 bucket (server access logging) logs access to the bucket itself, but does not ensure that CloudTrail trails deliver events to that bucket; it is not a necessary step for centralizing trail logs.

150
MCQhard

A DevOps team applies the above IAM policy to a group. A developer in this group tries to upload an object to the S3 bucket using the AWS CLI without specifying any encryption. The upload fails with an AccessDenied error. Why does the upload fail?

A.The Allow statement's condition is satisfied, but the Deny statement is evaluated first and denies the request.
B.The Allow statement requires encryption to be AES256, but the CLI defaults to SSE-S3, which is not AES256.
C.The Deny statement explicitly denies PutObject when encryption is not AES256, overriding the Allow.
D.The Deny statement's condition is not met because the request does not include encryption headers.
AnswerC

Explicit Deny always overrides Allow.

Why this answer

The Deny statement explicitly denies `s3:PutObject` when encryption is not AES256 (`StringNotEquals "AES256"`). Since the upload request does not specify any encryption, the condition is true, and the Deny applies, overriding any Allow. Option A is incorrect because the Allow statement's condition (requiring AES256) is not satisfied, so it does not grant permission; however, the failure is due to the explicit Deny, not because Deny is evaluated first.

Option B is incorrect because the Allow condition is not met, and the CLI default (SSE-S3) is actually AES256, but the Deny still applies because no encryption headers are present. Option D is incorrect because the Deny condition is met (StringNotEquals AES256 is true when no encryption is specified).

Page 1

Page 2 of 9

Page 3

All pages