Courseiva

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

1487 questions total · 20pages · All types, answers revealed

Page 16

Page 17 of 20

Page 18
1201
Multi-Selecthard

A company is migrating to AWS and needs to comply with PCI DSS. They must encrypt all data at rest and in transit. Which THREE services or features should they use?

Select 3 answers
A.Elastic Load Balancing (ELB) with TLS termination.
B.AWS CloudTrail to log all API calls.
C.Amazon S3 server-side encryption (SSE-S3) for S3 objects.
D.AWS Key Management Service (KMS) to manage encryption keys.
E.AWS WAF to protect web applications.
AnswersA, C, D

A TLS-enabled ELB (ALB or NLB) terminates the TLS/SSL handshake with clients, decrypting traffic at the AWS edge and thereby providing the cryptographic controls required for cardholder data in transit under PCI DSS Requirement 4. It also allows you to attach an AWS Certificate Manager certificate and optionally re-encrypt traffic to backend targets, so the load balancer is a correct service for securing communications.

Why this answer

Elastic Load Balancing (ELB) with TLS termination ensures encryption of data in transit between clients and the load balancer, which is a PCI DSS requirement for protecting cardholder data over public networks. By terminating TLS at the ELB, you can offload the cryptographic overhead while maintaining compliance with the encryption-in-transit mandate.

Exam trap

The trap here is that candidates often confuse compliance-related services (like CloudTrail for logging or WAF for security) with encryption-specific services, leading them to select options that are valid for security but do not directly satisfy the encryption-at-rest and encryption-in-transit mandates of PCI DSS.

1202
MCQmedium

A DevOps engineer is designing a CI/CD pipeline for a microservices application. The pipeline must scan container images for vulnerabilities before deploying to Amazon ECS. Which service should the engineer use to perform the vulnerability scan?

A.AWS WAF
B.Amazon ECR image scanning
C.AWS Config
D.Amazon GuardDuty
AnswerB

Amazon ECR image scanning automatically checks container images for known vulnerabilities (CVEs) by integrating with Amazon Inspector. In a CI/CD pipeline, you can invoke a scan after pushing an image to ECR, then retrieve findings via an API and block the deployment if critical vulnerabilities exist. This directly satisfies the requirement to identify known security vulnerabilities in images before they are deployed.

Why this answer

Amazon ECR can scan images for vulnerabilities. Option A is wrong because AWS WAF is a web application firewall. Option C is wrong because AWS Config is for compliance and resource inventory.

Option D is wrong because Amazon GuardDuty is a threat detection service for workloads.

1203
MCQmedium

A development team uses AWS CodePipeline to orchestrate builds and deployments. They want to automatically deploy to a staging environment only if a manual approval step is granted. Which configuration should they use?

A.Add an approval action in the pipeline stage before the deploy action.
B.Use a Lambda function to check a parameter in Parameter Store.
C.Configure a CloudWatch Events rule to trigger deployment after a manual event.
D.Set the deploy action to manual invocation only.
AnswerA

Adding a manual approval action is the native CodePipeline mechanism for inserting a human gate before a deploy action. When the pipeline reaches this action, the execution status changes to OnHold, and the pipeline pauses until an authorized user approves or rejects the action via the console, AWS CLI, or API. You can also configure an SNS notification or a custom URL (e.g., a change request ticket) to guide the approver; if approved, the deploy action automatically proceeds, which directly satisfies the requirement for a manual sign-off before deployment.

Why this answer

AWS CodePipeline supports a manual approval action that pauses the pipeline at a specified stage until an authorized user approves or rejects the deployment. By placing the approval action in the stage before the deploy action, the pipeline will only proceed to the staging deployment after the manual approval is granted, satisfying the requirement exactly.

Exam trap

The trap here is that candidates often confuse manual approval with manual invocation, not realizing that a manual approval action pauses the pipeline for a decision, whereas manual invocation means the action is never automatically triggered by the pipeline.

How to eliminate wrong answers

Option B is wrong because a Lambda function checking a parameter in Parameter Store does not inherently pause the pipeline or enforce a manual approval gate; it would require custom logic to block the pipeline and does not provide the native approval workflow with IAM-based authorization and notification. Option C is wrong because a CloudWatch Events rule can trigger a deployment based on events, but it cannot enforce a manual approval step within the pipeline; it would either start a new pipeline execution or invoke a target, not pause an existing pipeline for human review. Option D is wrong because setting the deploy action to manual invocation only means the action must be started manually outside the pipeline, which breaks the automated orchestration of CodePipeline and does not integrate the approval step as a gate within the pipeline flow.

1204
MCQeasy

A company runs a containerized application on Amazon ECS with Fargate. The application needs to store session state. Which service provides the MOST resilient and scalable solution?

A.Amazon ElastiCache for Redis
B.Amazon EFS
C.Ephemeral storage on the container instance
D.Amazon S3
AnswerA

Amazon ElastiCache for Redis is a fully managed in-memory data store that provides sub-millisecond read/write latencies and is ideal for storing transient session state. It supports replication across Availability Zones and automatic failover, so the session store remains available even if a container task is rescheduled or an Availability Zone fails. Because it is external to the ECS task, the session data persists independently of the container lifecycle, enabling stateless containers and horizontal scaling of the web tier.

Why this answer

Amazon ElastiCache for Redis provides a highly available, scalable, and low-latency in-memory data store ideal for session state management in a containerized environment. It supports replication and automatic failover, ensuring resilience. Option B (Amazon EFS) is a file storage service with higher latency and not designed for sub-millisecond session retrieval.

Option C (ephemeral storage on the container instance) is not durable; data is lost when the container stops or fails. Option D (Amazon S3) is object storage with higher latency and not optimized for frequent read/write operations required for session state.

1205
MCQmedium

A team uses AWS CodeBuild to run security scans on code before deployment. They want to ensure that if the security scan fails, the build is marked as FAILED and no further pipeline stages execute. What should they add to the buildspec?

A.Use the 'artifacts' section to define failure conditions.
B.Use the 'env' section to set a variable that fails the build.
C.Use the 'reports' section to mark the build as failed if tests fail.
D.Use the 'phases' section with a command that exits with a non-zero status on failure.
AnswerD

The 'phases' section is the correct place to implement failure logic because CodeBuild evaluates the exit status of each shell command run in its sub-sections (install, pre_build, build, post_build). If any command exits with a non-zero status, the build is stopped immediately and marked as FAILED. For a security scan, you would invoke your scanning tool in the 'build' phase and rely on that exit status to signal failure. This is the only mechanism that directly controls the build outcome.

Why this answer

In AWS CodeBuild, the build process is controlled by the 'phases' section of the buildspec file. Each phase runs a series of commands sequentially, and if any command exits with a non-zero status (e.g., a security scan tool returns a failure exit code), CodeBuild immediately marks the build as FAILED and stops further execution. This ensures that no subsequent pipeline stages are triggered, as the build status propagates to the pipeline.

Exam trap

The trap here is that candidates often confuse the 'reports' section (which only generates test reports) with the mechanism that actually fails the build, forgetting that only the exit code of commands in the 'phases' section determines build success or failure.

How to eliminate wrong answers

Option A is wrong because the 'artifacts' section is used to define output files to be uploaded to Amazon S3 or passed to downstream actions; it does not control build failure conditions or exit codes. Option B is wrong because the 'env' section is used to define environment variables, shell variables, or parameter-store references; setting a variable alone cannot cause the build to fail unless a command later uses it to exit non-zero. Option C is wrong because the 'reports' section is used to specify test report groups for CodeBuild to analyze and export to Amazon CloudWatch or a test report dashboard; it does not directly mark the build as failed if tests fail—only the exit code of commands in the 'phases' section determines build success or failure.

1206
Multi-Selecthard

A company uses Amazon RDS for MySQL with Multi-AZ deployment. The database experiences a sudden spike in connections, causing the application to timeout. The DevOps engineer notices that the 'DatabaseConnections' metric is high, but the 'CPUUtilization' is low. Which THREE actions should the engineer take to diagnose the issue?

Select 3 answers
A.Check the 'max_connections' parameter in the DB parameter group and increase it if needed.
B.Add a read replica to offload read traffic.
C.Scale up the DB instance class to handle more connections.
D.Enable the 'general_log' and 'log_output' parameters to capture connection attempts.
E.Enable Performance Insights and review the top SQL queries and sessions.
AnswersA, D, E

The max_connections parameter in the RDS parameter group defines the hard ceiling of allowed simultaneous client connections; if this limit is being hit, legitimate application requests are rejected with 'too many connections'. Reviewing this value against your connection pool settings and raising it if it's legitimately too low can provide immediate relief, but doing so without understanding why the number of connections jumped can exhaust memory or threads because each connection consumes resources. Also, changing the parameter group may require a reboot depending on whether it's a static or dynamic parameter, so monitor after applying.

Why this answer

Checking the 'max_connections' parameter in the DB parameter group reveals whether the connection spike is hitting the configured limit. Increasing it temporarily can alleviate timeouts while investigating the root cause. Option D is correct because enabling the general_log and setting log_output to TABLE or FILE captures connection attempts, helping identify the source of connections (e.g., a surge from a specific application or an attack).

Option E is correct because Performance Insights provides visibility into active sessions and top SQL, allowing the engineer to pinpoint which queries or connections are contributing to the spike. Option B is incorrect because adding a read replica offloads read traffic, not connections; the primary instance still handles all write connections. Option C is incorrect because scaling up the DB instance class primarily addresses CPU, memory, and I/O capacity, but does not directly increase the connection limit; it is better to first diagnose with logging and Performance Insights before resizing.

1207
MCQhard

A company runs a containerized application on Amazon EKS. The DevOps engineer needs to collect application metrics and make them available in Amazon CloudWatch. Which solution should be used?

A.Use AWS X-Ray daemon to collect metrics and send them to CloudWatch.
B.Install the Amazon CloudWatch agent as a DaemonSet on the EKS cluster.
C.Deploy the AWS Distro for OpenTelemetry collector on the EKS cluster.
D.Enable Amazon CloudWatch Container Insights using the AWS Management Console.
AnswerB

The Amazon CloudWatch agent is installed as a DaemonSet to run on every node in the EKS cluster, enabling it to gather node, pod, and container metrics from the Kubernetes API, kubelet, and container runtime. It publishes these metrics to the CloudWatch Container Insights namespace and can also collect Prometheus metrics. This is the standard, fully integrated method for enabling Container Insights on EKS.

Why this answer

The CloudWatch agent installed as a DaemonSet on the EKS cluster can collect container and application metrics and send them to CloudWatch. Option B is correct. Option A is incorrect because AWS X-Ray is for tracing, not metrics.

Option C is incorrect because AWS Distro for OpenTelemetry can also collect metrics but requires additional setup; the CloudWatch agent is the recommended approach. Option D is incorrect because enabling Container Insights via the console alone does not automatically collect application metrics; it requires the CloudWatch agent or a sidecar.

1208
Multi-Selectmedium

A company runs a critical application on Amazon ECS with Fargate. The DevOps team wants to set up a metric to track the number of tasks running. Which TWO steps are required to achieve this? (Choose TWO.)

Select 2 answers
A.Create a CloudWatch alarm on the 'RunningTaskCount' metric.
B.Install the CloudWatch agent on the task containers.
C.Enable Container Insights for the ECS cluster.
D.Configure a CloudWatch Logs subscription filter to count tasks.
E.Create a service auto scaling target for the ECS service.
AnswersA, C

The RunningTaskCount metric is an ECS control-plane metric automatically emitted by AWS for each service and cluster, including services running on Fargate. An alarm on this metric can directly compare the current running task count against a threshold or the DesiredTaskCount, and notify via SNS when it falls below expected levels. This is the simplest, most direct way to detect service degradation without any additional agents or instrumentation.

Why this answer

Options A and C are correct. Container Insights must be enabled for the ECS cluster (C) to generate the 'RunningTaskCount' metric. Then a CloudWatch alarm can be created on that metric (A) to track the number of tasks.

Option B is incorrect because the CloudWatch agent is not needed for Fargate; metrics are provided via Container Insights. Option D is incorrect because CloudWatch Logs subscription filters are used for filtering log events, not for generating metrics. Option E is incorrect because a service auto scaling target is used for scaling, not for monitoring task count.

1209
Multi-Selecthard

A DevOps team is troubleshooting a slow website that uses Amazon CloudFront with an Application Load Balancer as the origin. The team notices that cache hit ratio is low. Which THREE actions are most likely to improve the cache hit ratio?

Select 3 answers
A.Configure CloudFront to forward all cookies to the origin.
B.Enable CloudFront Origin Shield to reduce load on the origin and increase cache effectiveness.
C.Decrease the default TTL for objects.
D.Increase the minimum TTL for the CloudFront distribution.
E.Optimize the cache key to include only relevant headers.
AnswersB, D, E

Origin Shield is an optional intermediate cache layer that sits between CloudFront edge locations and the origin, aggregating requests from all edges. When multiple edges miss their local cache for the same object, Origin Shield consolidates those requests into a single origin fetch and caches the result globally, raising the effective hit ratio for the entire distribution and reducing origin traffic. It also adds resilience by absorbing request spikes and lowering latency for revalidation.

Why this answer

CloudFront Origin Shield acts as an additional caching layer that consolidates requests from multiple edge locations, reducing the load on the origin and increasing the likelihood of cache hits by serving cached content from the Origin Shield regional cache. This improves cache effectiveness, especially for origins with high latency or limited capacity.

Exam trap

The trap here is that candidates often confuse decreasing TTL with improving cache hit ratio, but in reality, shorter TTLs cause more frequent cache expirations and origin fetches, reducing cache effectiveness.

1210
MCQeasy

A company wants to ensure its Amazon RDS DB instance is highly available with automatic failover in case of an AZ failure. Which configuration should they use?

A.Multi-AZ deployment
B.Amazon RDS Proxy
C.Single-AZ with automated backups
D.Read replicas in multiple AZs
AnswerA

Multi-AZ deployment creates a primary DB instance and a standby replica in a different Availability Zone, using synchronous physical replication to keep the standby transactionally consistent. When an AZ failure, network outage, or instance health check failure occurs, Amazon RDS automatically flips the DNS CNAME to the standby within about 60–120 seconds, providing automatic failover without manual intervention. This is the only option that gives the DB instance true high availability with a single endpoint, which is why it is correct.

Why this answer

Multi-AZ deployment provides automatic failover to a standby instance in another AZ.

1211
MCQmedium

A company runs a web application on EC2 instances behind an ALB. To improve resilience, they want to automatically re-register failed instances. Which solution meets this requirement?

A.Set up a CloudWatch alarm to terminate the instance and notify an operator to re-register it.
B.Enable EC2 instance recovery and configure ALB health checks to deregister unhealthy instances.
C.Configure Auto Scaling to launch a new instance on instance failure.
D.Use Route 53 health checks to detect failure and update DNS to remove the instance.
AnswerB

EC2 instance recovery replaces the instance and ALB health checks will automatically re-register it once healthy.

Why this answer

Enabling EC2 instance recovery automatically restarts the instance on a new healthy host if the underlying hardware fails, while ALB health checks detect application-level failures and deregister unhealthy instances from the target group. This combination ensures failed instances are automatically replaced in the load balancer's rotation without manual intervention, meeting the resilience requirement.

Exam trap

The trap here is that candidates confuse EC2 instance recovery (which restarts the instance on a new host) with Auto Scaling's ability to replace instances, but the question specifically asks for re-registering the failed instance, not launching a new one.

How to eliminate wrong answers

Option A is wrong because terminating the instance and notifying an operator to re-register it introduces manual steps and does not automate re-registration; it also lacks automatic recovery. Option C is wrong because Auto Scaling launches a new instance only when the instance is terminated or fails a health check, but it does not automatically re-register the existing failed instance; it replaces it, which may not be desired if the instance can be recovered. Option D is wrong because Route 53 health checks remove the instance from DNS routing, but they do not re-register the instance with the ALB target group; they only affect DNS-level traffic distribution, not the ALB's target group membership.

1212
MCQmedium

A DevOps engineer notices that an Amazon RDS for MySQL instance's CPU is consistently high during business hours. The engineer wants to identify the specific queries causing the high CPU. Which combination of services should be used to capture and analyze the queries? (Choose the best answer.)

A.Enable RDS Performance Insights and analyze the top SQL queries
B.Enable RDS Enhanced Monitoring and view metrics in CloudWatch
C.Enable AWS X-Ray tracing on the application and database
D.Enable RDS audit logs and stream them to Amazon CloudWatch Logs
AnswerA

Performance Insights identifies the top queries by CPU usage.

Why this answer

RDS Performance Insights provides a database performance tuning feature that visualizes database load and identifies the specific SQL queries causing high CPU. It captures query-level metrics such as wait events, SQL digest, and host/user information, allowing the DevOps engineer to pinpoint the exact queries responsible for the CPU spike during business hours.

Exam trap

The trap here is that candidates often confuse Enhanced Monitoring (OS-level metrics) with Performance Insights (query-level analysis), or assume audit logs or X-Ray can provide SQL-level performance data, when in fact they serve different purposes (compliance and tracing, respectively).

How to eliminate wrong answers

Option B is wrong because Enhanced Monitoring provides OS-level metrics (e.g., CPU, memory, disk I/O) but does not capture or identify individual SQL queries; it cannot show which specific queries are causing high CPU. Option C is wrong because AWS X-Ray traces application requests and can trace calls to the database, but it does not capture the actual SQL queries executed on the RDS instance; it is designed for distributed tracing, not query-level analysis. Option D is wrong because RDS audit logs record database activities (e.g., logins, schema changes) for compliance, not query performance metrics; streaming them to CloudWatch Logs does not provide the query-level CPU impact analysis needed to identify high-CPU queries.

1213
Multi-Selecteasy

A company is designing a highly available architecture for a web application that uses Amazon EC2 instances. The application must be resilient to the failure of a single instance and a single Availability Zone. Which TWO actions should the company take? (Choose TWO.)

Select 2 answers
A.Use an Auto Scaling group with a minimum of two instances spread across two Availability Zones.
B.Distribute EC2 instances across at least two Availability Zones.
C.Place all EC2 instances in a single Availability Zone and use a Network Load Balancer.
D.Use a single Application Load Balancer in one Availability Zone.
E.Use a single large EC2 instance in one Availability Zone.
AnswersA, B

An Auto Scaling group with a minimum of two instances across two Availability Zones is the most complete solution because it combines horizontal scaling with automated self-healing. The ASG continuously monitors instance health and automatically replaces failed instances, while distributing the workload across two AZs ensures that a single Availability Zone outage does not eliminate all capacity. This is the gold standard for highly available EC2 architectures.

Why this answer

An Auto Scaling group with a minimum of two instances spread across two Availability Zones ensures that if one instance or one entire AZ fails, the remaining instance(s) in the other AZ can continue serving traffic, and Auto Scaling will automatically launch a replacement instance in the healthy AZ to restore the desired count. Option B is correct because distributing EC2 instances across at least two Availability Zones is the fundamental requirement for AZ-level resilience, as it eliminates a single point of failure at the AZ boundary.

Exam trap

The trap here is that candidates often think a load balancer alone provides high availability, but they overlook that the load balancer itself must be deployed across multiple AZs (or be a Regional service like ALB with cross-zone load balancing enabled) and that instances must be in at least two AZs to survive an AZ failure.

1214
MCQmedium

During a deployment using AWS CodeDeploy, the deployment fails with the error 'The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available, or some instances in your deployment group are experiencing problems.' The deployment group is configured with a minimum healthy instances of 75%. What could be the cause?

A.The deployment configuration timeout is too short.
B.The CodeDeploy service role does not have sufficient permissions.
C.The instances are not running the CodeDeploy agent.
D.More than 25% of the instances failed the deployment.
AnswerD

A deployment configuration with a 25% failure margin means that the minimum healthy instances threshold is set to 75% (or the equivalent fleet percentage). CodeDeploy continuously monitors the health of each instance across lifecycle events; if more than one quarter of the instances fail or abort, the remaining healthy percentage drops below 75%, and CodeDeploy terminates the deployment to protect the service. The state becomes 'Failed' with a message about the minimum healthy instances threshold being breached.

Why this answer

The error message explicitly states that too many individual instances failed deployment and too few healthy instances are available. With a minimum healthy instances setting of 75%, the deployment fails when more than 25% of the instances in the deployment group fail their deployment. This is a built-in safety mechanism in AWS CodeDeploy to prevent cascading failures and ensure application availability.

Exam trap

The trap here is that candidates may confuse the 'minimum healthy instances' threshold with other deployment configuration settings like timeout values or agent health, when in fact the error message directly indicates that the threshold of 75% healthy instances was breached because more than 25% of instances failed.

How to eliminate wrong answers

Option A is wrong because a timeout that is too short would cause individual instance deployment failures, but the error message specifically points to the aggregate failure threshold being exceeded, not a timeout issue. Option B is wrong because insufficient permissions in the CodeDeploy service role would cause a different error, such as 'AccessDenied' or 'Unable to access the S3 bucket', not the specific healthy-instances threshold error. Option C is wrong because if instances were not running the CodeDeploy agent, they would appear as 'Unknown' or 'Not registered' in the deployment group, and the error would be about missing agents, not about too many failed instances relative to healthy ones.

1215
MCQeasy

A company runs a critical web application on AWS. The application is deployed on EC2 instances behind an Application Load Balancer (ALB). The instances are in an Auto Scaling group across multiple Availability Zones. The company uses Amazon Route 53 for DNS with a failover routing policy. Recently, the operations team noticed that during a regional outage, the failover did not trigger as expected, and users experienced downtime. The health checks in Route 53 are configured to check the ALB endpoint. The ALB's health checks are configured to check the instances. What is the MOST likely reason the failover did not work?

A.The ALB remained healthy during the regional outage, so Route 53 did not fail over.
B.The failover routing policy requires manual intervention to switch traffic.
C.Route 53 health checks were not configured for the instance IP addresses.
D.Route 53 cannot failover to a different region when the primary endpoint is still reachable.
AnswerA

The health check associated with the primary ALB endpoint continued to receive a valid HTTP 200 response, so Route 53 considered the resource healthy and did not trigger failover to the secondary region. Even though an AZ was experiencing an outage, the ALB is a regional service that can remain available if it is deployed in other AZs, or the outage may have been in a different part of the region. Since the health check threshold was never breached, Route 53 had no reason to update DNS records.

Why this answer

Route 53 health checks are configured to check the ALB endpoint. During a regional outage, if the ALB itself remains healthy (e.g., the outage only affected the instances but not the ALB), the health check passes, so Route 53 does not trigger failover. This leads to users experiencing downtime because the instances behind the ALB are unhealthy, but Route 53 still directs traffic to the primary region.

Option B is incorrect because failover with Route 53 is automatic when a health check fails; no manual intervention is required. Option C is incorrect because Route 53 health checks do not need to check instance IPs; checking the ALB is sufficient for failover as long as the ALB's health reflects instance health, but in this case it doesn't. Option D is incorrect because Route 53 can failover to a different region when the primary endpoint becomes unhealthy, but the condition for failover (health check failure) was not met.

1216
MCQhard

A company is deploying a multi-tier application on AWS. The web tier must be publicly accessible, but the application tier must only be accessible from the web tier. The database tier should not be accessible from the internet at all. Which combination of security groups and network ACLs should be used?

A.Use security groups: allow 0.0.0.0/0 on all ports to web tier, allow all traffic between all instances.
B.Place all instances in the same security group with inbound rules allowing only ports 80/443 from 0.0.0.0/0.
C.Use security groups: allow 0.0.0.0/0 on port 80/443 to web tier, allow web tier security group to app tier, allow app tier security group to database tier.
D.Use network ACLs: allow 0.0.0.0/0 on port 80/443 to web subnet, allow web subnet to app subnet, allow app subnet to database subnet.
AnswerC

This is the correct multi-tier security group design because it enforces least privilege with instance-level granularity. The web tier security group allows only HTTP/S from the internet, the app security group allows traffic only from the web security group (not from any IP or CIDR), and the database security group allows only from the app security group. Using security group references instead of CIDR blocks means that any instance bearing the web SG is automatically allowed to reach the app tier, which makes scaling and instance replacement seamless without updating rules. This approach is stateful, so responses are automatically allowed, and it is far more secure than subnet-level NACL rules, which are stateless and cannot distinguish between instances within the same subnet.

Why this answer

Security groups are stateful and default to deny all inbound. By allowing inbound on port 80/443 from 0.0.0.0/0 to the web tier, and allowing inbound from the web tier's security group to the app tier, and only allowing inbound from the app tier to the database tier, you achieve the required isolation. Network ACLs are stateless and not needed if security groups are properly configured.

1217
MCQeasy

A developer is writing an AWS CloudFormation template to create an Amazon S3 bucket. The bucket name must be unique across all AWS accounts. Which property should the developer use to ensure the name is unique?

A.Use the DeletionPolicy attribute to retain the bucket.
B.Set the BucketName property to a unique value using a parameter.
C.Use the UpdateReplacePolicy attribute to control replacement.
D.Omit the BucketName property so CloudFormation generates a unique name.
AnswerD

When the BucketName property is omitted from an S3 bucket resource, CloudFormation automatically generates a globally unique name by combining the stack name with a random suffix (e.g., my-stack-s3bucket-1a2b3c4d5e6f). This generated name guarantees uniqueness across all AWS accounts and regions, because the random component virtually eliminates collision risk. CloudFormation then exposes this generated name through the Ref function and the resource's physical ID, allowing other resources to reference it without ever needing to know the exact value beforehand. This is the simplest and most reliable way to avoid bucket-name conflicts without manual input.

Why this answer

Omit the BucketName property so CloudFormation generates a unique name. Amazon S3 bucket names must be globally unique across all AWS accounts. If you specify a custom BucketName, you must ensure its uniqueness yourself, which is error-prone.

By omitting BucketName, CloudFormation automatically generates a unique name that includes a random suffix, guaranteeing global uniqueness. Option A (DeletionPolicy) controls what happens when the stack is deleted, not naming. Option B (setting BucketName to a unique value via parameter) still requires manual uniqueness and is not a property that ensures uniqueness automatically.

Option C (UpdateReplacePolicy) controls replacement behavior on updates, not naming. Therefore, omitting BucketName is the simplest way to ensure a unique name.

1218
MCQeasy

A startup is using AWS CloudFormation to manage their infrastructure. They have a stack that creates an Amazon S3 bucket and an Amazon DynamoDB table. The stack was created successfully, but when they try to update the stack to add a new S3 bucket, the update fails with the error 'CREATE_FAILED - S3 bucket already exists'. The new bucket name is unique and does not exist. The template uses the same AWS::S3::Bucket resource type. What is the most likely cause?

A.The IAM user does not have permission to create S3 buckets.
B.The S3 bucket name was previously used and is still in the process of being deleted (bucket name not yet released).
C.The stack is in a different region than where the bucket is being created.
D.The CloudFormation template uses the wrong resource type for the bucket.
AnswerB

This is the correct answer because S3 bucket names are globally unique and are not released immediately after deletion. When a bucket is deleted, S3 enters a 'pending deletion' state where the name is still reserved for a variable period (usually minutes, sometimes up to an hour). Attempting to create a new bucket with that same name, whether through CloudFormation or the CLI, results in a BucketAlreadyExists (or BucketAlreadyOwnedByYou for the same account) error until the name is fully released. Since the stack previously managed a bucket with the same name and deleted it, the name is likely still in this cleanup window.

Why this answer

The error 'CREATE_FAILED - S3 bucket already exists' despite using a unique bucket name indicates that the bucket name was previously used and is still in a deletion state. S3 bucket names are globally unique and cannot be reused immediately after deletion; there is a waiting period for the name to be released. Option B is correct because the bucket name is not yet available.

Option A is incorrect because the IAM user likely has sufficient permissions if the bucket creation fails only during update. Option C is incorrect because the region would not cause this specific error. Option D is incorrect because the resource type is appropriate.

1219
Multi-Selecteasy

A company is deploying a critical web application on AWS and needs to ensure high availability and disaster recovery across multiple AWS Regions. The application uses an Application Load Balancer (ALB) in the primary Region and an Amazon RDS Multi-AZ DB instance. Which TWO actions should the company take to meet these requirements? (Choose two.)

Select 2 answers
A.Configure an Amazon RDS Multi-AZ deployment in a secondary Region.
B.Set up Amazon CloudFront with multiple origins pointing to each Region's ALB.
C.Create an Auto Scaling group in the secondary Region that automatically scales up when the primary fails.
D.Use AWS Global Accelerator with endpoint groups in multiple Regions.
E.Configure Amazon Route 53 with a failover routing policy and health checks.
AnswersD, E

Global Accelerator provides cross-region failover.

Why this answer

AWS Global Accelerator provides static IP addresses and routes traffic to the optimal endpoint across regions, supporting active-passive failover for multi-region disaster recovery. Option E is correct because Amazon Route 53 with a failover routing policy and health checks can monitor the primary ALB's health and automatically route traffic to a secondary ALB in another region if the primary fails. Option A is wrong because RDS Multi-AZ only provides high availability within a single region, not cross-region disaster recovery.

Option B is wrong because Amazon CloudFront is a content delivery network, not designed for regional failover routing; it can distribute content but does not provide active-passive failover across regions. Option C is wrong because Auto Scaling groups are for scaling compute capacity within a region, not for cross-region failover.

1220
MCQeasy

A DevOps engineer is setting up an AWS CodeBuild project that needs to access resources in a VPC, such as an Amazon RDS database. The engineer has configured the CodeBuild project to run in the VPC. Which additional configuration is required for CodeBuild to pull the build Docker image?

A.Create a VPC peering connection to another VPC that has internet access.
B.Configure a VPC gateway endpoint for Amazon ECR.
C.Attach an internet gateway to the VPC and add a default route to it.
D.Create a VPC interface endpoint for Amazon ECR and configure the CodeBuild project to use it.
AnswerD

This is correct because interface endpoints (AWS PrivateLink) for Amazon ECR provide private connectivity from your VPC without requiring internet access. You need to create both the ECR API endpoint and the ECR Docker Registry (DKR) endpoint, and then configure the CodeBuild project to use the VPC, subnet, and security group associated with those endpoints. This allows the build to pull images and push to ECR securely over the AWS network.

Why this answer

When a CodeBuild project runs inside a VPC, it loses default internet access, so it cannot reach public endpoints like Amazon ECR (Docker Hub or ECR) to pull the build image. A VPC interface endpoint (powered by AWS PrivateLink) creates a private, highly available connection to Amazon ECR within the VPC, allowing CodeBuild to pull images without traversing the internet. This is the correct solution because it provides direct, secure access to ECR while keeping all traffic within the AWS network.

Exam trap

The trap here is that candidates often confuse gateway endpoints (which work only for S3 and DynamoDB) with interface endpoints (which are required for services like ECR, ECS, and API Gateway), leading them to incorrectly select option B.

How to eliminate wrong answers

Option A is wrong because VPC peering connects two VPCs but does not provide internet access or a route to Amazon ECR; it would only allow communication between the peered VPCs, not to external services. Option B is wrong because a VPC gateway endpoint is only supported for Amazon S3 and DynamoDB, not for Amazon ECR; ECR requires an interface endpoint (PrivateLink) for private connectivity. Option C is wrong because attaching an internet gateway and adding a default route would give the VPC internet access, but CodeBuild in a VPC does not automatically use that route for pulling images; it would require a NAT gateway or instance in a public subnet, and even then, it is less secure and more complex than using a VPC interface endpoint.

1221
Multi-Selectmedium

A DevOps engineer is tasked with encrypting data at rest for an Amazon RDS for MySQL database. Which TWO methods can achieve this?

Select 2 answers
A.Enable encryption when creating the DB instance using a customer-managed KMS key.
B.Enable encryption when creating the DB instance using the AWS managed KMS key.
C.Use the default RDS encryption with a customer-managed key without KMS.
D.Enable encryption on an existing unencrypted DB instance by modifying the instance.
E.Use client-side encryption with the RDS SDK.
AnswersA, B

Enabling encryption when creating the DB instance with a customer-managed KMS key is a valid method for encrypting data at rest.

Why this answer

Options A and B are correct because Amazon RDS for MySQL supports encryption at rest using AWS KMS. You can enable encryption when creating the DB instance with either a customer-managed KMS key (Option A) or the AWS managed KMS key (Option B). Option C is incorrect because RDS encryption always uses AWS KMS; there is no option to use a customer-managed key without KMS.

Option D is incorrect because encryption cannot be enabled on an existing unencrypted DB instance; you must create a new encrypted instance and migrate the data. Option E is incorrect because client-side encryption is not a built-in RDS feature and would require application-level changes, not a direct method of encrypting data at rest in RDS.

1222
MCQmedium

A company's production EC2 instance running a web application becomes unresponsive. The operations team checks CloudWatch metrics and sees a CPU Utilization spike to 100% for the last 10 minutes. What is the MOST efficient first step to restore service?

A.Check the instance's system logs in CloudWatch Logs to identify the root cause
B.Create an AMI of the instance and launch a new instance from that AMI
C.Reboot the EC2 instance from the AWS Management Console or CLI
D.Terminate the instance and launch a new one from the latest AMI
AnswerC

A graceful reboot via the AWS Management Console or CLI sends an ACPI reboot signal to the guest OS, which restarts the operating system and all application processes while preserving the instance ID, private IP, EBS volumes, and attached Elastic IP. This is the fastest and least disruptive recovery action for transient conditions like memory leaks or a stuck process, and it typically resolves the issue within minutes without requiring reconfiguration.

Why this answer

Rebooting the EC2 instance is the most efficient first step to restore service when the instance is unresponsive due to a CPU spike. A reboot can quickly resolve transient software issues or resource exhaustion without data loss. Option A (checking CloudWatch Logs) delays recovery—investigation should come after restoration.

Option B (creating an AMI and launching a new instance) is time-consuming and unnecessary for initial recovery. Option D (terminating and launching a new instance) risks data loss and is more drastic than rebooting.

1223
MCQeasy

A company uses AWS Key Management Service (KMS) to encrypt data at rest. The security team needs to know who attempted to decrypt data using a specific KMS key and whether the attempt succeeded. Which AWS service should the team use?

A.AWS Config
B.KMS key policies
C.AWS CloudTrail
D.CloudWatch Logs
AnswerC

AWS CloudTrail is the correct service because it records all KMS API requests as events, including both management-plane actions like CreateKey and EnableKeyRotation and data-plane operations like Encrypt, Decrypt, and GenerateDataKey. Each event includes details such as the caller identity, source IP address, key ID, and timestamp, which allows you to audit key usage and detect unauthorized access after the fact.

Why this answer

AWS CloudTrail is the correct service because it records all KMS API calls, including Decrypt, Encrypt, and GenerateDataKey, as events in the CloudTrail logs. By examining CloudTrail events for the specific KMS key ID, the security team can see who called the Decrypt API and whether the call succeeded (HTTP 200) or failed (e.g., AccessDenied). This provides the exact audit trail needed for incident response.

Exam trap

The trap here is that candidates confuse AWS Config (which tracks resource configuration) with CloudTrail (which tracks API activity), or they assume KMS key policies themselves provide audit logs, when in fact policies only control permissions and do not generate event records.

How to eliminate wrong answers

Option A is wrong because AWS Config evaluates resource compliance against rules and records configuration changes, but it does not capture API-level actions like decryption attempts. Option B is wrong because KMS key policies define who can use the key and under what conditions, but they do not generate logs or provide historical audit records of decryption attempts. Option D is wrong because CloudWatch Logs can store log data from various sources, but it is not the native service for capturing KMS API calls; CloudTrail is the service that generates those logs, which can optionally be sent to CloudWatch Logs.

1224
MCQmedium

A development team is implementing a CI/CD pipeline using AWS CodePipeline. The pipeline has a Source stage connected to an Amazon S3 bucket, a Build stage using AWS CodeBuild, and a Deploy stage that deploys to an Amazon ECS cluster. The team notices that the pipeline fails intermittently during the Build stage with a 'BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE' error. What is the most likely cause?

A.The CodeBuild project is in a different AWS Region than the CodePipeline pipeline.
B.The CodeBuild project is configured to run in a VPC without a NAT gateway, and the build image is pulled from a public registry.
C.The S3 bucket where the source code is stored has a bucket policy denying access to the CodeBuild service role.
D.The CodeBuild project does not have enough memory or vCPU allocated.
AnswerB

Without a NAT gateway, the build container cannot access the public internet to pull the image.

Why this answer

The 'BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE' error in AWS CodeBuild indicates that the build environment cannot pull the specified Docker image from its registry. When a CodeBuild project is configured to run in a VPC without a NAT gateway, it lacks outbound internet access, which is required to pull images from public registries like Docker Hub or Amazon ECR public. This is the most likely cause because the error is intermittent (e.g., if the image is cached locally sometimes) and directly relates to network connectivity.

Exam trap

The trap here is that candidates often confuse VPC networking errors with permission or resource errors, overlooking that CodeBuild in a VPC without a NAT gateway blocks outbound traffic to public registries, which is a subtle but critical detail for the 'BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE' error.

How to eliminate wrong answers

Option A is wrong because CodePipeline and CodeBuild can operate across different AWS Regions without causing a 'BUILD_CONTAINER_UNABLE_TO_PULL_IMAGE' error; the pipeline simply references the CodeBuild project by ARN, and cross-region pulls are handled by the build environment's network configuration, not the pipeline's region. Option C is wrong because an S3 bucket policy denying access to the CodeBuild service role would cause a 'SOURCE_STAGE' or 'DOWNLOAD_SOURCE' error, not a build container pull error, as the source artifact is fetched before the build stage begins. Option D is wrong because insufficient memory or vCPU would result in a 'BUILD_CONTAINER_MEMORY_LIMIT_EXCEEDED' or 'BUILD_TIMEOUT' error, not a container image pull failure.

1225
MCQmedium

A company's incident response process requires that all changes to production resources are automatically paused when a P1 incident is declared. Which AWS service can be used to enforce this by preventing modifications to CloudFormation stacks?

A.AWS Systems Manager Change Manager
B.AWS CloudFormation StackSets with a service control policy (SCP)
C.AWS Config rules with remediation
D.AWS CloudTrail with Insights
AnswerB

This is the correct answer because an SCP attached at the root or OU can deny cloudformation:UpdateStack, UpdateStackSet, DeleteStack, and related actions for all IAM principals in those accounts. SCPs are permission boundaries that take effect even for highly privileged IAM roles, and the denial is evaluated before any IAM policy grants, making it a preventive control. CloudFormation StackSets allows you to deploy a consistent SCP to every account in the organization in one operation, ensuring a uniform 'freeze' across the entire environment. This enables incident responders to immediately halt all stack modifications, which squarely meets the requirement to prevent changes.

Why this answer

AWS CloudFormation StackSets with a service control policy (SCP) can prevent updates to CloudFormation stacks across accounts in an organization. Option A is incorrect because AWS Systems Manager Change Manager provides a change management workflow but does not automatically pause changes. Option C is incorrect because AWS Config rules evaluate compliance and can trigger automatic remediation but do not prevent changes from being made.

Option D is incorrect because AWS CloudTrail with Insights is used for auditing and detecting unusual API activity, not for preventing modifications.

1226
MCQmedium

A DevOps engineer runs the above command and sees that one target is unhealthy with reason 'Target.Timeout'. The target is an EC2 instance running a web server on port 80. The security group for the instance allows inbound traffic on port 80 from the ALB's security group. What is the most likely cause of the health check failure?

A.The instance does not have a public IP address.
B.The instance's network ACL is blocking inbound traffic from the internet.
C.The web server on the instance is not responding to health check requests on port 80.
D.The security group for the ALB does not allow outbound traffic to the instance.
AnswerC

Timeout indicates no response from the web server.

Why this answer

The 'Target.Timeout' reason indicates that the health check request timed out, meaning the instance is not responding within the timeout period. The most common cause is that the web server is not running or is not listening on the correct port. Option C is correct because a non-responsive web server on port 80 would cause the timeout.

Option A is incorrect because health checks are performed over private IPs, not public IPs. Option B is incorrect because the network ACL applies at the subnet level and would affect all traffic; the ALB's security group is already allowed inbound, and the instance's security group allows inbound from the ALB. Option D is incorrect because the ALB's security group does not need to allow outbound to the instance; traffic flows from the ALB to the instance, and the instance's security group must allow inbound from the ALB.

1227
MCQeasy

A company runs a production web application on Amazon EC2 instances that are part of an Auto Scaling group. The instances are behind an Application Load Balancer. The DevOps team has enabled detailed CloudWatch metrics and set up a CloudWatch dashboard to monitor the application. Recently, the team noticed that the CPU Utilization metric for the Auto Scaling group shows a spike every day at 2:00 PM, but the application performance remains normal. The team wants to investigate the cause of the CPU spike. What should the team do FIRST to identify the root cause?

A.Enable AWS CloudTrail to log all API calls to the instances.
B.Use CloudWatch Logs Insights to query the application logs on the instances to identify any scheduled tasks or jobs running at 2:00 PM.
C.Disable any scheduled tasks on the instances to see if the spike stops.
D.Increase the instance size to provide more CPU capacity to handle the spike.
AnswerB

CloudWatch Logs Insights enables you to run SQL-like queries across log groups that receive application and system logs from EC2 instances via the unified CloudWatch agent. By filtering for messages between 1:55 PM and 2:05 PM and searching for terms such as 'cron,' 'schedule,' or the job name, you can identify a recurring batch process that coincides with the spike. This is a non-invasive, first-step diagnostic that directly associates application behavior with the CPU metric.

Why this answer

The correct first step is to use CloudWatch Logs Insights to query application logs on the instances to identify any scheduled tasks or jobs running at 2:00 PM. This allows the team to investigate the root cause of the CPU spike by analyzing log data, such as cron jobs or batch processes. Option A (CloudTrail) logs API calls, not CPU usage or instance-level processes.

Option C (disabling scheduled tasks) would modify the environment without understanding the cause. Option D (increasing instance size) is a reactive measure, not an investigative step.

1228
MCQeasy

A developer wants to use AWS CloudFormation to create an Amazon RDS DB instance. The template includes a DB instance resource. Which property is required for the DB instance to be created successfully?

A.DBInstanceClass and Engine
B.AllocatedStorage
C.DBInstanceIdentifier
D.MasterUsername and MasterUserPassword
AnswerA

In CloudFormation's AWS::RDS::DBInstance resource, DBInstanceClass and Engine are mandatory properties for every instance. DBInstanceClass defines the instance's compute and memory capacity, while Engine specifies the database engine (e.g., mysql, postgres). Without these, the resource automatically fails validation because CloudFormation can't provision a database without a compute class and an engine type. This makes this pair the correct answer for the property required universally.

Why this answer

In AWS CloudFormation, when creating an Amazon RDS DB instance using the AWS::RDS::DBInstance resource, the only truly required properties are DBInstanceClass (the compute and memory capacity) and Engine (the database engine, e.g., MySQL, PostgreSQL). These two properties are mandatory in the CloudFormation resource specification; without them, the template will fail validation. All other properties, such as AllocatedStorage, DBInstanceIdentifier, MasterUsername, and MasterUserPassword, have default behaviors or can be omitted under certain conditions (e.g., AllocatedStorage defaults to 20 GB for some engines, and MasterUsername/MasterUserPassword are not required if you use a snapshot or a source DB instance).

Exam trap

The trap here is that candidates often assume MasterUsername and MasterUserPassword are always required because they are mandatory in the AWS Management Console wizard, but CloudFormation allows omitting them when the DB instance is created from a snapshot or as a read replica, making DBInstanceClass and Engine the only universally required properties.

How to eliminate wrong answers

Option B is wrong because AllocatedStorage is not required; CloudFormation will use a default value (typically 20 GB) if not specified, and the DB instance can still be created successfully. Option C is wrong because DBInstanceIdentifier is optional; if omitted, CloudFormation automatically generates a unique identifier for the DB instance. Option D is wrong because MasterUsername and MasterUserPassword are not required when creating a DB instance from a snapshot or when specifying a source DB instance identifier; they are only required for a fresh, empty DB instance creation.

1229
MCQhard

A DevOps engineer observes the CloudWatch alarm output shown in the exhibit. The alarm is in ALARM state for instance i-0abcd1234efgh5678. The engineer checks the EC2 console and sees that the instance's CPU utilization is currently 10%. What is the MOST likely explanation?

A.The alarm is misconfigured with wrong metric
B.The threshold was set too low
C.The alarm has not yet evaluated enough low datapoints to change state
D.The CPUUtilization metric is not being emitted
AnswerC

For a CloudWatch alarm to transition from ALARM to OK, it must evaluate a specified number of consecutive periods where the metric is below the threshold (e.g., 3 of 3 datapoints below 90%). After the CPU spike dropped back down, the alarm has only recently started seeing low datapoints; until enough consecutive okay datapoints are evaluated, the alarm state remains ALARM. This is CloudWatch's default state-transition behavior to avoid flapping, not a misconfiguration.

Why this answer

The alarm is configured with EvaluationPeriods=1, meaning it requires only one high datapoint to trigger ALARM. The CPU spiked to 100% at 09:55, causing the alarm to enter ALARM state. Even though CPU utilization has since dropped to 10%, the alarm remains in ALARM until it evaluates a sufficient number of low datapoints to transition to OK.

Since only one high datapoint was needed to trigger, only one low datapoint is needed to return to OK, but the alarm may not have evaluated the latest low datapoint yet, or the alarm's state transition period may not have elapsed. Option A is wrong because the metric exists and is being emitted. Option B is wrong because the threshold is set to 90%, which is appropriate.

Option D is wrong because the CPUUtilization metric is being emitted, as evidenced by the spike.

1230
Multi-Selecthard

A security team wants to automatically detect and remediate S3 buckets that are publicly accessible across multiple AWS accounts. Which solution is MOST efficient and scalable? (Choose THREE.)

Select 3 answers
A.Use AWS Trusted Advisor to check for open S3 buckets and send alerts.
B.Apply a service control policy (SCP) to deny s3:PutBucketAcl that makes buckets public.
C.Manually review each account's S3 bucket permissions weekly.
D.Use AWS Config with a managed rule to detect publicly accessible S3 buckets.
E.Use Amazon CloudWatch Events to trigger a Lambda function that remediates non-compliant buckets.
AnswersB, D, E

An SCP attached at the AWS Organizations root or an OU can deny the specific IAM actions that grant public access, such as s3:PutBucketAcl with a condition like s3:x-amz-acl=public-read or s3:PutBucketPolicy. Because SCPs act as a governance boundary across all accounts in the organization, they proactively prevent a bucket from ever becoming public, but they do not remediate existing buckets that are already public, so this is a preventive, not detective, control.

Why this answer

Options B, D, and E are correct. An SCP can centrally deny s3:PutBucketAcl actions that make buckets public, preventing public access across all accounts (B). AWS Config with the managed rule 's3-bucket-public-read-prohibited' can detect publicly accessible buckets across accounts when using an aggregator (D).

CloudWatch Events (now Amazon EventBridge) can trigger a Lambda function to automatically remediate non-compliant buckets, such as applying a bucket policy or ACL change (E). Option A (Trusted Advisor) is per-account and only alerts, not remediates; Option C (manual review) is not scalable for multiple accounts.

1231
Multi-Selectmedium

A DevOps engineer is designing a monitoring solution for a multi-account AWS environment using AWS Organizations. The solution must collect logs from all accounts into a centralized Amazon S3 bucket for analysis. Which THREE steps are required to set up this centralized logging?

Select 3 answers
A.Enable VPC Flow Logs for all VPCs in every account and send them to the centralized bucket
B.Create an S3 bucket in the central logging account with bucket policies allowing cross-account writes
C.Enable AWS CloudTrail in each account and configure it to deliver logs to the centralized S3 bucket
D.Set up Amazon Kinesis Data Streams in the central account to ingest logs from all accounts
E.Configure Amazon CloudWatch Logs subscription filters to stream logs from each account to the centralized S3 bucket via Kinesis Data Firehose
AnswersB, C, E

A central S3 bucket in the logging account must accept writes from all other accounts' logging services. The bucket policy must grant the specific service principals (e.g., cloudtrail.amazonaws.com and logs.amazonaws.com) from each account permission to perform s3:PutObject, while restricting access to the prefix paths so logs remain separated. This bucket policy is the foundational enabler for cross-account log delivery and is therefore a mandatory prerequisite for the entire solution.

Why this answer

Options B, C, and E are correct. To set up centralized logging across multiple AWS accounts using AWS Organizations: B) Create an S3 bucket in the central logging account with a bucket policy that allows cross-account writes from other accounts. C) Enable AWS CloudTrail in each account and configure it to deliver logs to the centralized S3 bucket.

This captures API activity. E) Configure Amazon CloudWatch Logs subscription filters in each account to stream logs (e.g., from applications or services) to the centralized S3 bucket via Kinesis Data Firehose. Option A (VPC Flow Logs) is not required for all accounts—it can be selectively enabled.

Option D (Kinesis Data Streams) is not necessary; logs can be delivered directly to S3 via Firehose or CloudTrail.

1232
MCQhard

A company uses an NLB to distribute traffic to a fleet of EC2 instances in a single Availability Zone. During a recent AWS outage in that zone, the application became completely unavailable. The company wants to achieve high availability without rearchitecting the application. Which change is MOST appropriate?

A.Use a larger instance type and enable detailed CloudWatch monitoring
B.Replace the NLB with an Application Load Balancer and enable cross-zone load balancing
C.Create an Auto Scaling group with a scheduled scaling policy to add instances during peak hours
D.Launch EC2 instances in a second Availability Zone and register them with the NLB target group
AnswerD

Launching additional EC2 instances in a second Availability Zone and registering them with the NLB target group creates a multi-AZ target fleet, allowing the load balancer to route new connections to healthy instances in the surviving zone when the original zone has an outage. To make this work you must also configure the NLB itself with subnets in at least two AZs so its nodes are geographically distributed; then the target group's health checks automatically remove failed instances and keep the service available. This is the correct architecture for fault tolerance because it eliminates the single AZ as a point of failure and aligns with AWS's region-based resiliency patterns.

Why this answer

Registering EC2 instances in a second Availability Zone with the NLB target group allows NLB to route traffic to healthy instances across zones, providing high availability during a zone outage. Option A is incorrect because using a larger instance type and enabling detailed CloudWatch monitoring does not add redundancy across zones. Option B is incorrect because replacing NLB with an ALB still requires multi-AZ configuration to achieve high availability; cross-zone load balancing is already available on NLB.

Option C is incorrect because scheduled scaling does not protect against zone failures; it only adjusts capacity predictably.

1233
MCQeasy

A development team uses AWS CodeCommit as a Git repository. They want to automatically trigger a build in AWS CodeBuild whenever a pull request is created or updated. Which AWS service should be used to detect the pull request events and start the build?

A.Amazon Simple Notification Service (SNS)
B.AWS CodePipeline
C.Amazon CloudWatch Logs
D.Amazon EventBridge
AnswerD

Amazon EventBridge (formerly CloudWatch Events) is the correct service because it provides a default event bus that captures AWS service events, including CodeCommit repository events like 'Reference Created', 'Reference Updated', and 'Reference Deleted'. By defining a rule with an event pattern filtered by repository and branch, EventBridge can directly trigger a CodeBuild project through a built-in integration, passing commit details like the commit ID and branch name to the build, enabling fully event-driven CI/CD without custom glue code.

Why this answer

Amazon EventBridge can capture CodeCommit repository events, such as pull request creation and updates, via its event bus. By setting up an EventBridge rule that matches these specific events, you can directly trigger an AWS CodeBuild project as a target, enabling automated builds without additional orchestration services.

Exam trap

The trap here is that candidates often confuse EventBridge with CloudWatch Events (its predecessor) or assume that SNS is sufficient for triggering builds, overlooking that EventBridge provides direct, event-driven integration with CodeBuild without intermediate services.

How to eliminate wrong answers

Option A is wrong because Amazon SNS is a pub/sub notification service that does not directly invoke CodeBuild; it would require a separate subscriber (e.g., a Lambda function) to parse the notification and call the CodeBuild API, adding unnecessary complexity. Option B is wrong because AWS CodePipeline is a CI/CD orchestration service that can integrate with CodeCommit and CodeBuild, but it is not designed to react to individual pull request events in real time without polling or webhook configuration; EventBridge is the native event-driven solution for this use case. Option C is wrong because Amazon CloudWatch Logs is used for storing, monitoring, and accessing log data, not for detecting repository events or triggering builds; it has no mechanism to capture CodeCommit pull request events.

1234
MCQmedium

A company uses AWS CodePipeline for CI/CD. A recent deployment to an Amazon ECS service failed because the new task definition referenced an ECR image that does not exist. The pipeline uses a source stage (CodeCommit), build stage (CodeBuild), and deploy stage (ECS). The engineer wants to catch such errors earlier. What should the engineer add to the pipeline?

A.Add an invoke action that calls a Lambda function to check the image.
B.Add a manual approval step before the deploy stage.
C.Add a test stage that runs a script to verify the image exists in ECR.
D.Add a second build stage that re-builds the image.
AnswerC

Adding a test stage immediately after the build stage with a script using the AWS CLI or SDK to call ecr:DescribeImages for the specific repository and image tag validates that the expected artifact exists before deployment. This automated gate runs in every pipeline execution, catches missing or mis-tagged images at the earliest practical point, and fails the pipeline with a clear error rather than letting the deploy stage fail late. It is the correct, lightweight fix that does not alter build behavior.

Why this answer

Adding a test stage after the build stage that runs a script to verify the image exists in ECR would catch the error before deployment. Option A is wrong because while an invoke action with Lambda could check the image, it requires custom development and is less straightforward than a simple test stage. Option B is wrong because a manual approval step requires human intervention and does not automatically catch the error.

Option D is wrong because a second build stage would rebuild the image unnecessarily and does not validate the existing image.

1235
Multi-Selecthard

A company manages multiple AWS accounts using AWS Organizations. The DevOps team needs to enforce that all newly created S3 buckets in any account automatically have versioning enabled and are encrypted with SSE-S3. Which THREE steps should the team take to achieve this using Infrastructure as Code and policy-based controls?

Select 3 answers
A.Create an SCP that denies s3:PutObject if the bucket does not have encryption enabled.
B.Configure AWS CodePipeline to run a script that checks bucket configurations after creation.
C.Manually configure each new bucket via the AWS Management Console.
D.Use AWS CloudFormation StackSets to deploy a template that creates S3 buckets with required settings in all accounts.
E.Deploy an AWS Config managed rule to check that S3 buckets have versioning enabled, with automatic remediation using SSM Automation.
AnswersA, D, E

SCPs can restrict API calls across accounts, enforcing encryption at creation time.

Why this answer

To enforce S3 bucket versioning and encryption using IaC and policy controls, three steps are effective. Option A: Create an SCP that denies s3:PutObject if encryption is not enabled, preventing non-compliant bucket creation. Option D: Use AWS CloudFormation StackSets to deploy a baseline template across all accounts that creates S3 buckets with versioning and SSE-S3 encryption.

Option E: Deploy an AWS Config managed rule to check for versioning and use automatic remediation via SSM Automation to enable versioning on non-compliant buckets. Option B (CodePipeline) does not enforce policies proactively, and Option C (manual) is not scalable.

1236
MCQhard

A company uses RDS Multi-AZ with a read replica. During a failover test, the application experiences a 30-second write outage. The application uses a single DB endpoint. How can the outage be minimized?

A.Increase the instance class to improve failover performance.
B.Use RDS Proxy to handle database connections and failover.
C.Use a Route 53 weighted record with health checks to point to both instances.
D.Configure the application to use the read replica endpoint for writes.
AnswerB

RDS Proxy pools and shares database connections between the application and the RDS instance, so when a Multi-AZ failover occurs, the proxy keeps existing client connections alive and transparently re-routes them to the new primary. This eliminates the connection storms and reconnection lag that normally slow application recovery after failover. The proxy also shortens the failover window by avoiding the need for each application thread to re-establish its own session, making HA failover faster and more reliable for stateful applications.

Why this answer

RDS Proxy helps minimize write outages during failover by managing database connections efficiently. It maintains connection pools and automatically routes connections to the new primary after failover, reducing the outage window from seconds to sub-second. Option A (increasing instance class) does not affect failover time because failover duration is dominated by DNS propagation and database recovery, not instance size.

Option C (Route 53 weighted record with health checks) is not suitable because Multi-AZ failover already handles DNS updates automatically, and using a weighted record with health checks would require additional complexity and still involve DNS propagation delays. Option D (using read replica endpoint for writes) is invalid because read replicas do not accept write operations; they are read-only.

1237
MCQhard

Refer to the exhibit. An IAM policy is attached to a group. A user in the group tries to stop an EC2 instance in us-east-1. What will happen?

A.The action is denied because the policy does not explicitly allow stopping an instance that is running.
B.The action is denied because the Deny statement is ambiguous and could apply to StopInstances.
C.The action is allowed only if the instance is in a stopped state.
D.The action is allowed because StopInstances is explicitly allowed and not denied.
AnswerD

The IAM policy includes an explicit Allow for ec2:StopInstances, and no explicit Deny statement covers StopInstances. Under IAM evaluation logic, an explicit Allow overrides the default implicit Deny, and since no explicit Deny applies, the request is permitted. Therefore, the user can stop the instance regardless of its running state.

Why this answer

The policy explicitly allows ec2:StopInstances for all resources, and there is no explicit deny for StopInstances. The Deny only applies to TerminateInstances. Option A is incorrect because StopInstances is allowed.

Option B is incorrect because the Deny is not ambiguous. Option C is incorrect because there is no condition key about instance state.

1238
MCQeasy

A company is designing a multi-region active-active architecture for a stateless web application. The application uses a DynamoDB table as its data store. The company wants to minimize write latency and ensure that writes are accepted in any region with eventual consistency. Which DynamoDB feature should they use?

A.DynamoDB read replicas in each region.
B.Cross-region replication using AWS Lambda function.
C.DynamoDB global tables.
D.DynamoDB Accelerator (DAX) with multi-region endpoints.
AnswerC

Amazon DynamoDB global tables provide a fully managed multi-Region, multi-master replication solution that maintains two or more identical tables across AWS Regions. When a write is issued to any replica, DynamoDB automatically propagates that write to every other region using DynamoDB Streams, with last-writer-wins conflict resolution to reconcile concurrent updates. This makes global tables the appropriate choice for an active-active architecture because each region can accept both reads and writes while providing low-latency access for geographically distributed users. The service handles the replication plumbing, versioning, and conflict resolution internally, eliminating the need for custom code.

Why this answer

DynamoDB global tables provide a fully managed, multi-region, multi-active solution that automatically replicates data across AWS Regions. This enables low-latency writes in any region with eventual consistency, meeting the requirement for an active-active architecture without custom code or additional infrastructure.

Exam trap

The trap here is that candidates may confuse DynamoDB Accelerator (DAX) as a solution for multi-region writes, but DAX only caches reads in a single region and does not replicate writes across regions.

How to eliminate wrong answers

Option A is wrong because DynamoDB read replicas are not a native feature; DynamoDB supports global tables for multi-region replication, not read replicas. Option B is wrong because using AWS Lambda for cross-region replication introduces custom code, complexity, and potential latency, and is not a managed, native DynamoDB feature for active-active setups. Option D is wrong because DAX is an in-memory cache that reduces read latency but does not replicate writes across regions; it operates within a single region and does not provide cross-region write acceptance.

1239
MCQhard

A company uses AWS Lambda functions to process events from Amazon SQS. Recently, the Lambda function has been throttled, causing messages to accumulate in the dead-letter queue (DLQ). The function’s reserved concurrency is set to 100, and the account’s regional concurrency limit is 1000. What is the MOST likely cause of the throttling?

A.The function’s concurrency is fully utilized due to long-running invocations
B.The Lambda function has a cold start issue
C.The SQS queue is not configured as a FIFO queue
D.The reserved concurrency is set too high, exceeding the account limit
AnswerA

Lambda concurrency is the number of in-flight invocations across all resources. When a function's execution time is long, each invocation holds a concurrency slot for the entire duration, so the configured reserved concurrency of 100 can be reached with relatively few requests. Once all slots are occupied, Lambda throttles additional invocations with a 429 error, and the SQS event source mapping receives a failure, causing messages to remain in the queue. This is the classic cause of throttling with long-running workers, not the other options.

Why this answer

The most likely cause of throttling is that the function's reserved concurrency of 100 is fully utilized due to long-running invocations. When invocations take longer to complete, they occupy concurrency for an extended period, preventing new invocations from starting. This leads to messages accumulating in the DLQ.

Option D is incorrect because reserved concurrency of 100 is well below the account limit of 1000, so that is not the cause. Option B is incorrect because cold starts cause latency but not throttling; they do not consume concurrency. Option C is incorrect because the queue type (standard vs.

FIFO) does not directly cause throttling; Lambda can process from both.

1240
Multi-Selecthard

A company is designing a disaster recovery plan for a MySQL database running on Amazon RDS. The database is critical and must have an RPO of 5 minutes and an RTO of 1 hour. The primary Region is us-east-1, and the DR Region is us-west-2. Which TWO steps should the company take to meet these requirements? (Choose TWO.)

Select 2 answers
A.Create a cross-Region read replica in us-west-2.
B.Enable automated backups with a 5-minute backup window.
C.Configure cross-Region automated snapshot copy to us-west-2.
D.Set up a process to promote the read replica to a standalone instance in us-west-2 during a disaster.
E.Enable Multi-AZ deployment in us-east-1.
AnswersA, D

Cross-Region read replicas replicate with low lag, achieving RPO under 5 minutes.

Why this answer

A cross-Region read replica in us-west-2 provides a near-real-time copy of the primary database, with replication lag typically measured in seconds, easily meeting the 5-minute RPO. During a disaster, promoting this read replica to a standalone instance in us-west-2 can be completed in minutes, satisfying the 1-hour RTO. This approach avoids the recovery time needed to restore from a snapshot or backup.

Exam trap

The trap here is that candidates confuse Multi-AZ (which provides automatic failover within a Region) with cross-Region disaster recovery, or assume that automated backups or snapshot copies can meet a low RPO/RTO when they actually require time-consuming restore operations.

1241
MCQmedium

A DevOps team is using AWS CodePipeline to automate deployments. The pipeline has a source stage (CodeCommit), a build stage (CodeBuild), and a deploy stage (CodeDeploy). The team wants to add a manual approval step before the deploy stage to ensure that only authorized personnel can approve production deployments. Which action should be taken to implement this requirement?

A.Add an AWS Lambda function as a transition action between the build and deploy stages that sends an email to the approver and waits for a response.
B.Create a CodeDeploy deployment group with a manual approval step in the deployment configuration.
C.Configure an Amazon SNS topic to send an approval request email to the approver, and use a Lambda function to resume the pipeline upon approval.
D.Add a manual approval action to the pipeline between the build and deploy stages, and configure the SNS topic to notify the approvers.
AnswerD

Adding a manual approval action between the build and deploy stages creates a required gate that pauses pipeline execution, satisfying the constraint that only authorised personnel can approve production deployments. Configuring the SNS topic enables the pipeline to send email or SMS notifications to the designated approvers, ensuring they are alerted to review and approve the change before CodeDeploy proceeds.

Why this answer

AWS CodePipeline natively supports a manual approval action that can be inserted as a stage between build and deploy. This action pauses the pipeline and sends a notification via an SNS topic to the configured approvers. The pipeline only resumes when an authorized user clicks the 'Approve' button in the CodePipeline console or API, ensuring that only authorized personnel can approve production deployments.

Exam trap

The trap here is that candidates often confuse CodeDeploy's deployment configuration options (like traffic shifting or validation hooks) with pipeline-level approval actions, or they assume a custom Lambda function can replace the native approval action, missing the fact that CodePipeline provides a fully managed, auditable approval workflow.

How to eliminate wrong answers

Option A is wrong because AWS Lambda cannot act as a transition action in CodePipeline; transitions are automatic and cannot be replaced by custom functions. Option B is wrong because CodeDeploy deployment groups do not have a manual approval step in their deployment configuration; manual approvals are a pipeline-level feature, not a CodeDeploy feature. Option C is wrong because while an SNS topic can send approval emails, using a Lambda function to resume the pipeline bypasses the built-in approval workflow and security controls of CodePipeline, and the pipeline would not properly wait for the approval response.

1242
MCQmedium

A DevOps engineer needs to securely store database credentials for an application running on EC2. The credentials must be rotated automatically every 30 days. Which solution meets these requirements?

A.Use AWS Secrets Manager to store the credentials and configure automatic rotation with the RDS rotation Lambda blueprint.
B.Store credentials in AWS Systems Manager Parameter Store and use a Lambda function to rotate them.
C.Store credentials in an S3 bucket encrypted with KMS and use S3 Lifecycle policies to rotate the objects.
D.Use IAM roles to grant the EC2 instance access to the database, eliminating the need for credentials.
AnswerA

AWS Secrets Manager is designed for managing database credentials and provides native automatic rotation. Its RDS rotation Lambda blueprint creates a Lambda function that updates the secret and the database user password on a defined schedule, without application changes. The service also tracks secret versions and supports KMS encryption, making it the secure, fully managed choice for this requirement.

Why this answer

AWS Secrets Manager is the correct choice because it is purpose-built for securely storing, managing, and automatically rotating database credentials. It provides a built-in RDS rotation Lambda blueprint that can be configured to rotate credentials every 30 days without custom code. This fully managed rotation capability meets the requirement for automatic, scheduled rotation with minimal operational overhead.

Exam trap

The trap here is that candidates often confuse AWS Systems Manager Parameter Store's ability to store secrets (with SecureString) with the automatic rotation capability, but Parameter Store lacks built-in rotation scheduling and requires custom Lambda code, making Secrets Manager the only fully managed solution for automatic credential rotation.

How to eliminate wrong answers

Option B is wrong because AWS Systems Manager Parameter Store does not natively support automatic rotation of credentials; while you can use a Lambda function to rotate them, this requires custom development and lacks the built-in rotation scheduling and integration with RDS that Secrets Manager provides. Option C is wrong because S3 Lifecycle policies are designed for object expiration and transition, not for rotating credential values; they cannot update the content of an object or trigger a credential change. Option D is wrong because IAM roles grant permissions to AWS services, not to databases; while IAM database authentication is supported for RDS (using an auth token), it eliminates the need for static credentials but does not involve rotating stored credentials every 30 days, and the question explicitly requires storing and rotating credentials.

1243
MCQhard

A company runs a containerized application on Amazon ECS with Fargate. The application needs to access an S3 bucket. The Security team requires that the application never uses long-term credentials and that access is scoped to the specific ECS task. Which approach should be used?

A.Embed the IAM user credentials in the container image
B.Store AWS access keys in AWS Secrets Manager and retrieve them at runtime
C.Use an IAM role for the EC2 instance if using EC2 launch type
D.Create an IAM role for the ECS task and reference it in the task definition
AnswerD

Create an IAM role that defines the exact AWS API permissions the container needs, then specify that role in the task definition using the taskRoleArn parameter. The ECS agent—on Fargate or EC2—assumes this role on behalf of the task and exposes temporary credentials to the container via the ECS credential endpoint, so the SDK automatically rotates them. This is the recommended pattern because it scopes credentials to a single task, follows least privilege, and eliminates the need to manage any static access keys.

Why this answer

ECS tasks using the Fargate launch type can assume an IAM role that is specified in the task definition. This IAM role provides temporary credentials via the ECS task metadata endpoint, ensuring that the application never uses long-term credentials and that permissions are scoped precisely to that task. The Security team's requirements are fully met by this approach.

Exam trap

The trap here is that candidates may confuse the IAM role for the EC2 instance (Option C) with the ECS task role, or assume that Secrets Manager (Option B) is acceptable despite it still using long-term credentials, failing to recognize that Fargate tasks require a task-level IAM role for scoped, temporary access.

How to eliminate wrong answers

Option A is wrong because embedding IAM user credentials in the container image violates the requirement to never use long-term credentials and creates a security risk if the image is compromised. Option B is wrong because while Secrets Manager can securely store AWS access keys, those keys are still long-term credentials, which the Security team explicitly prohibits. Option C is wrong because the question specifies Fargate launch type, not EC2; an IAM role for the EC2 instance would not apply to Fargate tasks, and even with EC2 launch type, it would not scope access to the specific ECS task.

1244
MCQhard

A DevOps engineer is troubleshooting an AWS OpsWorks for Chef Automate deployment. The Chef server is configured with a custom run list that includes a recipe to install and configure an application. The test environment works correctly, but in the production environment, the application fails to start. The Chef client logs show that the recipe executed successfully, but the application process is not running. What is the most likely cause of this issue?

A.The OpsWorks stack is configured to use 'auto-healing' which automatically terminates and replaces instances that fail to start the application.
B.The Chef server in production is running a different version of Chef than the test environment, causing the recipe to behave differently.
C.The IAM instance profile attached to the production EC2 instance does not have the necessary permissions to start the application service.
D.The Chef recipe does not include a 'service' resource to start the application; it only installs the package.
AnswerC

The instance profile must allow actions like ec2:StartInstances or ssm:StartAutomationExecution if the recipe uses those, or the application may need permissions to access resources.

Why this answer

The IAM instance profile determines the AWS API permissions available to the EC2 instance. If the profile lacks permissions to call the service startup API (e.g., `ec2:StartInstances` or `autoscaling:CompleteLifecycleAction`), or to access required resources like an EFS mount target or Secrets Manager secret, the Chef recipe's service resource may execute without error but the underlying systemd or init daemon cannot actually start the application process. The Chef client logs only show recipe execution success, not the outcome of the service start, so the application fails silently.

Exam trap

The trap here is that candidates assume a successful Chef client run guarantees the application is running, but the exam tests the distinction between recipe execution success and the actual outcome of system commands that depend on IAM permissions.

How to eliminate wrong answers

Option A is wrong because auto-healing in OpsWorks replaces instances that fail health checks, not instances where an application fails to start after successful recipe execution; the scenario describes a post-deployment failure, not an instance-level health failure. Option B is wrong because Chef server version differences would typically cause syntax or resource errors during recipe compilation, not a silent failure where the recipe executes successfully but the application does not run; the logs confirm successful execution. Option D is wrong because the question states the recipe includes a custom run list to install and configure the application, and the logs show successful execution; if the recipe lacked a service resource, the application would never be started, but the logs would not show a successful start attempt—the issue is that the start attempt fails due to permissions.

1245
MCQmedium

A company uses AWS CodeBuild to build and test code. The build process needs to access a private Amazon RDS database to run integration tests. What is the most secure way to provide database credentials to the build project?

A.Store the credentials as environment variables in the build project configuration.
B.Store the credentials in AWS Systems Manager Parameter Store as a SecureString parameter.
C.Store the credentials in AWS Secrets Manager and grant the CodeBuild service role permission to retrieve them.
D.Store the credentials in an encrypted S3 bucket and download them during the build phase.
AnswerC

AWS Secrets Manager is purpose-built for securely storing, rotating, and auditing access to secrets, with encryption via KMS at rest and in transit. By assigning the CodeBuild service role an IAM policy that allows secretsmanager:GetSecretValue for the specific secret, you can inject the secret directly into the build environment using the 'secrets-manager' environment variable type in the buildspec, ensuring the actual secret material never appears in logs, the console, or CloudFormation templates. Secrets Manager also provides automatic rotation (e.g., for RDS credentials), CloudTrail API logging for every retrieval, and fine-grained control through resource-based policies, making it the most secure and operationally efficient option for CodeBuild credential management.

Why this answer

AWS Secrets Manager is the most secure option because it is designed specifically for storing and rotating secrets like database credentials. It integrates with AWS CodeBuild via IAM roles, allowing the build project to retrieve credentials securely without exposing them in code or configuration. Option B (Parameter Store) can also store secrets but does not natively support automatic rotation, making it less suitable for database credentials.

Option A is insecure because environment variables can be exposed in logs or console output. Option D is less secure than Secrets Manager because it requires managing encryption keys and access policies manually, and does not provide automatic rotation.

1246
MCQeasy

A company is using Amazon RDS for MySQL and wants to monitor database connections. They need to set up an alarm when the number of connections exceeds 80% of the maximum connections for more than 5 minutes. Which CloudWatch metric and statistic should be used?

A.DatabaseConnections metric with Maximum statistic
B.DatabaseConnections metric with Average statistic
C.DatabaseConnections metric with Sum and then divide by the number of data points
D.DatabaseConnections metric with Sum statistic
AnswerB

The Average statistic computes the mean DatabaseConnections over the 5-minute interval, which inherently dampens short-lived fluctuations and reveals the central tendency of connection concurrency. If the average exceeds the 80% threshold, it means the typical number of connections during the entire window was too high, matching the criterion of sustained usage for more than 5 minutes. This is the most appropriate aggregation for a threshold alarm aimed at detecting prolonged saturation of the connection pool.

Why this answer

The Average statistic of the DatabaseConnections metric over a 5-minute period provides a smoothed representation of connection usage, which is appropriate for detecting sustained breaches of the 80% threshold. Using Average reduces sensitivity to transient spikes, ensuring the alarm triggers only when the average number of connections remains above the threshold for the entire evaluation period, aligning with the requirement of 'more than 5 minutes'.

Exam trap

The trap here is that candidates often choose Maximum because they think it is the most conservative for detecting high usage, but they overlook that the requirement is for sustained breaches over 5 minutes, not instantaneous spikes, making Average the correct choice for avoiding false alarms.

How to eliminate wrong answers

Option A is wrong because the Maximum statistic captures the highest single data point within the period, which would trigger alarms on brief spikes even if the average stays below 80%, causing false positives. Option C is wrong because dividing the Sum by the number of data points is mathematically equivalent to the Average statistic, but this approach is unnecessarily complex and not a standard CloudWatch metric statistic; CloudWatch directly supports Average. Option D is wrong because the Sum statistic aggregates the total number of connections over the period, which is not meaningful for comparing against a percentage of maximum connections—Sum values scale with the number of data points and do not represent a per-moment connection count.

1247
MCQeasy

A company wants to ensure that its application can recover from an Amazon S3 service disruption. The application reads and writes data to S3. Which strategy should the application implement to achieve resilience?

A.Store all data in a single S3 bucket with versioning enabled
B.Implement application logic to fall back to an S3 bucket in a different Region if the primary bucket is unavailable
C.Enable S3 Cross-Region Replication with automatic failover
D.Use S3 Transfer Acceleration to improve data transfer speed
AnswerB

This pattern gives the application explicit control over failover by first attempting to read from the primary bucket and, on failure (e.g., throttling, regional outage, or S3 service disruption), switching to a pre-created bucket in another Region. It is a common active-passive architecture that avoids reliance on any AWS feature providing automatic DNS-level or data-plane failover. Because the application itself detects the failure, it can also manage consistency, replication lag, and write buffering appropriately. This satisfies the recovery requirement because data availability is maintained as long as at least one Region is operational.

Why this answer

Implementing application logic to fall back to an S3 bucket in a different Region provides resilience against a regional S3 service disruption. S3 buckets are regional resources, so if one Region experiences an outage, the application can redirect reads and writes to a bucket in another Region. This approach requires the application to handle errors from the primary bucket and switch to the secondary bucket, ensuring continued availability without relying on automatic failover mechanisms that may not be instantaneous.

Exam trap

The trap here is that candidates often confuse S3 Cross-Region Replication (CRR) with automatic failover, but CRR is asynchronous and does not provide built-in failover; the application must still implement its own fallback logic to achieve resilience.

How to eliminate wrong answers

Option A is wrong because storing all data in a single S3 bucket with versioning enabled protects against accidental deletion or overwrite, but it does not provide resilience against a regional S3 service disruption, as the bucket is still tied to a single Region. Option C is wrong because S3 Cross-Region Replication (CRR) replicates objects asynchronously to another Region, but it does not include automatic failover; the application must still implement logic to detect the primary bucket's unavailability and switch to the replicated bucket. Option D is wrong because S3 Transfer Acceleration improves data transfer speed over long distances by using AWS edge locations, but it does not provide any resilience or failover capability during a regional S3 service disruption.

1248
MCQmedium

A company uses AWS Secrets Manager to rotate secrets for an RDS database. The rotation Lambda function fails with a timeout error. What is the most likely cause?

A.The Lambda function's execution role lacks the required IAM permissions.
B.The Lambda function is not configured to access the VPC where the RDS instance resides.
C.The secret rotation schedule is set to less than 24 hours.
D.The Lambda function does not have permission to access the S3 bucket.
AnswerB

For the rotation function to update credentials on RDS, it must be deployed inside the same VPC or have a route to it; if the Lambda function lacks VPC configuration, its ENI never gets a private IP in the RDS subnet. Each invocation then tries to open a socket to the database but has no network path, so it consumes the entire configured timeout and Secrets Manager reports rotation as failed. Merely granting IAM permissions for secretsmanager and RDS does not create network connectivity, so this is the root cause when the error is consistently a timeout rather than an access-denied.

Why this answer

The most likely cause of the timeout error is that the Lambda function is not configured to access the VPC where the RDS instance resides. When Secrets Manager rotates a secret for an RDS database, the rotation Lambda function must connect to the database to update the credentials. If the Lambda function is not attached to the same VPC (or a VPC with proper routing and security group rules), it cannot reach the RDS instance, causing network connection attempts to hang until the function times out.

Exam trap

The trap here is that candidates often confuse IAM permission errors (which produce immediate failures) with network connectivity issues (which cause timeouts), leading them to incorrectly select the IAM role option when the symptom is a timeout rather than an access denied error.

How to eliminate wrong answers

Option A is wrong because IAM permission issues typically result in an access denied error, not a timeout; the Lambda function would fail immediately with a 403 or similar, not hang until the timeout limit. Option C is wrong because the rotation schedule (e.g., every 24 hours or less) does not cause individual rotation executions to timeout; the schedule only controls how often rotation is triggered, not the duration of the Lambda invocation. Option D is wrong because Secrets Manager rotation for RDS does not require S3 bucket access; the Lambda function only needs network connectivity to the database and permissions to call Secrets Manager APIs, not S3.

1249
MCQhard

A company uses AWS Organizations with multiple accounts. The security team needs to automatically isolate a compromised EC2 instance by removing it from its security group and attaching a quarantine security group that only allows traffic to a forensic instance. Which combination of actions should be implemented?

A.Use Amazon GuardDuty to automatically modify the security group membership of the instance.
B.Use AWS Shield Advanced to automatically apply the quarantine security group to the instance.
C.Use AWS Lambda functions triggered by Amazon EventBridge to remove the instance from the security group and attach the quarantine group.
D.Use AWS Config rules with AWS Systems Manager Automation documents to automatically remove the instance from the security group and attach the quarantine group when non-compliant.
AnswerD

AWS Config can detect non-compliant instances (e.g., missing required tags) and trigger SSM Automation to perform remediation actions.

Why this answer

AWS Config rules can evaluate security group membership compliance, and when a non-compliant EC2 instance is detected, an AWS Systems Manager Automation document can be triggered via a remediation action. This automation document can execute the steps to remove the instance from its current security group and attach a quarantine security group, providing a fully automated, event-driven isolation workflow without requiring custom code for orchestration.

Exam trap

The trap here is that candidates often assume any event-driven automation (like Lambda + EventBridge) is always the best answer, but AWS Config with Systems Manager Automation is the native, fully managed, and auditable solution for compliance-driven remediation without custom code.

How to eliminate wrong answers

Option A is wrong because Amazon GuardDuty is a threat detection service that generates findings but cannot directly modify security group membership; it requires an integration with AWS Lambda or EventBridge to perform remediation actions. Option B is wrong because AWS Shield Advanced is a DDoS protection service and has no capability to modify EC2 security group associations or apply quarantine groups. Option C is wrong because while Lambda functions triggered by EventBridge can technically perform the remediation, the question asks for a combination of actions that should be implemented, and AWS Config with Systems Manager Automation is the recommended, fully managed, and auditable approach that avoids the operational overhead of maintaining custom Lambda code and IAM permissions.

1250
MCQmedium

A company uses AWS Lambda functions to process incoming events. The DevOps team notices that some functions are timing out after 30 seconds, but the configured timeout is 1 minute. They want to capture the actual invocation duration for all invocations to analyze performance. What is the most efficient way to achieve this?

A.Add custom metrics using the AWS SDK within the Lambda function code to record the duration.
B.Configure Amazon Kinesis Data Streams to receive Lambda invocation records and compute duration using a consumer application.
C.Enable detailed CloudWatch Logs for the Lambda functions and parse the 'REPORT' log entries to extract the 'Duration' value.
D.Use AWS CloudTrail to capture Lambda execution events and analyze the 'duration' field.
AnswerC

Enabling CloudWatch Logs is the correct approach because every Lambda invocation automatically emits a REPORT log entry containing a Duration field, for example 123.45 ms, along with billed duration and memory usage. This is generated by the Lambda managed runtime, so there is no need to instrument the application code. You can use CloudWatch Logs Insights with a filter such as filter @type = 'REPORT' to query and parse these entries across all invocations, making it an efficient and fully managed solution for extracting execution duration.

Why this answer

Lambda automatically writes a REPORT log entry to CloudWatch Logs at the end of each invocation, which includes the exact 'Duration' in milliseconds. Parsing these logs is the most efficient approach since it requires no code changes, no additional infrastructure, and leverages existing logging with no extra cost beyond standard CloudWatch Logs ingestion.

Exam trap

The trap here is that candidates may confuse CloudTrail's 'duration' field (which measures API call latency) with the actual function execution duration, leading them to incorrectly select option D.

How to eliminate wrong answers

Option A is wrong because adding custom metrics via the AWS SDK within the function code requires modifying every function, introduces latency from SDK calls, and incurs additional CloudWatch custom metrics costs, making it less efficient than using built-in logs. Option B is wrong because configuring Kinesis Data Streams to receive invocation records is overly complex and costly; Lambda does not natively send invocation records to Kinesis, and building a consumer application to compute duration from streamed data is far less efficient than parsing existing logs. Option D is wrong because CloudTrail captures API calls (e.g., Invoke actions) but does not record the actual function execution duration; the 'duration' field in CloudTrail events refers to the API call latency, not the function's runtime.

1251
Multi-Selectmedium

A company is using AWS CloudFormation to deploy a critical application stack. The company wants to ensure that the stack can be recovered quickly in case of a failure. Which THREE strategies should the company implement? (Choose THREE.)

Select 3 answers
A.Disable rollback on stack creation failure to preserve resources for debugging.
B.Use StackSets to deploy the stack across multiple Regions.
C.Define the entire application in a single CloudFormation template.
D.Use nested stacks to separate components into reusable templates.
E.Use change sets to review changes before updating the stack.
AnswersB, D, E

StackSets enable multi-Region deployment for resilience.

Why this answer

AWS CloudFormation StackSets allow you to deploy stacks across multiple AWS Regions and accounts from a single template, enabling multi-Region disaster recovery. By deploying the critical application stack in multiple Regions, you can quickly fail over to a secondary Region if the primary fails, meeting the requirement for rapid recovery.

Exam trap

The trap here is that candidates often confuse 'recovery' with 'debugging' and select disabling rollback (Option A) thinking it helps preserve resources, but it actually hinders recovery by leaving failed resources in place.

1252
MCQhard

An organization uses a multi-account AWS environment with AWS Organizations. During an incident, the security team needs to isolate a compromised account by preventing all API calls from that account's root user and IAM users. Which action should be taken?

A.Create a new IAM group with a deny-all policy and add all users to it.
B.Apply a service control policy (SCP) that denies all actions to the affected account's root user and all IAM users.
C.Attach an IAM policy denying all actions to all IAM users in that account.
D.Apply an SCP that denies all actions to the root user only.
AnswerB

An SCP attached to the affected account or its OU in AWS Organizations acts as a guardrail across every principal in the account, including the account root user and all IAM users and roles. By explicitly denying * , the SCP reduces each principal's effective permissions to an empty set, and because SCPs can only be changed by an administrator in the management account, neither the compromised root user nor any IAM user can detach or bypass the lockdown. This provides full account quarantine, which is exactly what the scenario requires.

Why this answer

A service control policy (SCP) is a feature of AWS Organizations that allows you to centrally control permissions for all accounts in your organization. An SCP can be applied to the root of the organization, an OU, or a specific account. When an SCP that denies all actions is applied to an affected account, it restricts permissions for all principals, including the root user and IAM users in that account.

This effectively isolates the compromised account by preventing any API calls. Option A is incorrect because creating a new IAM group with a deny-all policy and adding all users would affect only IAM users, not the root user. Option C is incorrect because an IAM policy attached to IAM users does not affect the root user.

Option D is incorrect because applying an SCP that denies all actions only to the root user would leave IAM users unrestricted, failing to fully isolate the account.

1253
MCQeasy

A DevOps engineer notices that an EC2 instance running a critical application is unresponsive. The instance is part of an Auto Scaling group with a minimum size of 2. What is the quickest way to restore service with minimal data loss?

A.Stop and start the instance from the EC2 console.
B.Create a new AMI from the instance and launch a replacement manually.
C.Terminate the instance and let the Auto Scaling group launch a new one.
D.Restore the instance from the most recent EBS snapshot.
AnswerC

Terminating the instance is the correct action because it triggers the Auto Scaling group to detect the lost capacity through its health checks and immediately launch a fresh instance from the launch template, restoring the desired instance count automatically. This approach ensures the replacement is clean, conforms to the group's configuration, and avoids the downtime and statefulness of manual repair, making it the most efficient and reliable recovery mechanism.

Why this answer

Terminating the unresponsive instance triggers the Auto Scaling group to automatically launch a replacement instance, restoring service with minimal data loss. Since the Auto Scaling group has a minimum size of 2, it will immediately detect the terminated instance and launch a new one using the launch template or configuration, ensuring the desired capacity is maintained without manual intervention.

Exam trap

The trap here is that candidates may think stopping and starting the instance (Option A) is the quickest fix, but they overlook that the Auto Scaling group's automated self-healing is designed exactly for this scenario and is faster than any manual recovery method.

How to eliminate wrong answers

Option A is wrong because stopping and starting the instance does not resolve the unresponsive state if the underlying issue is a software or OS hang; it also requires manual action and does not leverage the Auto Scaling group's self-healing capabilities. Option B is wrong because creating a new AMI from the unresponsive instance and manually launching a replacement is time-consuming, may propagate the failure state, and bypasses the automated recovery provided by the Auto Scaling group. Option D is wrong because restoring from the most recent EBS snapshot would revert the instance to a previous state, potentially causing significant data loss, and requires manual steps to attach the volume and launch a new instance, which is slower than letting the Auto Scaling group handle the replacement.

1254
MCQeasy

A DevOps engineer receives an alert that an EC2 instance's CPU utilization has been above 90% for the last 30 minutes. The engineer needs to investigate the root cause. Which AWS service should the engineer use to get OS-level process details and identify which process is consuming the CPU?

A.AWS Config
B.AWS CloudTrail
C.AWS Systems Manager Run Command
D.Amazon CloudWatch
AnswerC

AWS Systems Manager Run Command is part of AWS Systems Manager and lets you remotely and securely execute shell commands or PowerShell scripts on EC2 instances (and on-premises machines) via the SSM Agent. You can run a command like `ps aux` or `Get-Process` to enumerate running processes, capture output, and store it in S3 or CloudWatch Logs. Because the SSM Agent runs inside the instance as a guest process, it has direct access to OS-level state, making it the appropriate service for collecting process-level data. It also supports rate control and error handling for fleet-wide execution.

Why this answer

AWS Systems Manager Run Command allows you to run commands (e.g., 'top', 'ps') remotely on EC2 instances to obtain OS-level process details and identify which process is consuming CPU. Option A is wrong because AWS Config records configuration changes, not OS-level processes. Option B is wrong because AWS CloudTrail logs API calls, not system-level metrics.

Option D is wrong because Amazon CloudWatch provides aggregated CPU utilization metrics but cannot provide process-level details.

1255
Matchingmedium

Match each AWS service to its primary function in a DevOps pipeline.

Drag a concept onto its matching description — or click a concept then click the description.

Concepts
Matches

Continuous delivery service for release pipelines

Fully managed continuous integration build service

Automates code deployments to any instance

Unified user interface for managing software development activities

Fully managed source control service hosting Git repositories

Why these pairings

In a DevOps pipeline, AWS CodeCommit provides source control, CodeBuild compiles and tests code, CodeDeploy automates deployments, and CodePipeline orchestrates the entire CI/CD process. Common confusions include mixing up the roles of CodeCommit and CodeDeploy or CodeCommit and CodeBuild.

1256
MCQmedium

A company runs a serverless application using AWS Lambda functions that process messages from an Amazon SQS queue. The function scales up to handle high traffic but sometimes experiences throttling errors (HTTP 429) from Lambda. The company wants to improve the resilience of the application by reducing throttling. The SQS queue is configured as a Lambda event source with a batch size of 10. The Lambda function has a reserved concurrency of 100. Which combination of actions will best reduce throttling? (Choose the single best answer.)

A.Change the SQS queue to use a FIFO queue to guarantee exactly-once processing.
B.Increase the SQS batch size to 50 to process more messages per invocation.
C.Use a dead-letter queue (DLQ) for unprocessed messages and set up a CloudWatch alarm to trigger a second Lambda function to reprocess them.
D.Increase the Lambda function's reserved concurrency to 500.
AnswerD

Raising the Lambda function's reserved concurrency to 500 is correct because it directly increases the maximum number of simultaneous executions, allowing the SQS event source mapping to scale out beyond the previous limit and process more messages in parallel. With a higher concurrency ceiling, incoming SQS messages are consumed faster, preventing the burst of throttling attempts that occur when the function is already running at its current cap. This aligns with Lambda's SQS scaling model, where the number of active pollers grows with the message volume until the reserved concurrency is exhausted.

Why this answer

Throttling errors (HTTP 429) occur when Lambda function invocations exceed the account-level concurrency limit or the function's reserved concurrency. By increasing the reserved concurrency from 100 to 500, the function can handle more concurrent invocations, reducing the likelihood of throttling when traffic spikes. This directly addresses the scaling bottleneck without changing the event source or message processing pattern.

Exam trap

The trap here is that candidates often confuse throttling with message processing failures and choose a dead-letter queue or batch size change, but the core issue is insufficient concurrency allocation, which only reserved concurrency adjustment can fix.

How to eliminate wrong answers

Option A is wrong because changing to a FIFO queue does not affect concurrency or throttling; FIFO queues guarantee exactly-once processing and message ordering but do not increase the invocation capacity of Lambda. Option B is wrong because increasing the batch size to 50 may reduce the number of invocations but does not prevent throttling if the reserved concurrency is still too low; it could even cause timeouts or processing delays if messages accumulate. Option C is wrong because a dead-letter queue and a second Lambda function handle failed messages after throttling occurs, but they do not prevent the initial throttling errors; they add complexity without addressing the root cause of insufficient concurrency.

1257
MCQhard

A company uses AWS CodeCommit for source control. Developers frequently push large binary files (e.g., compiled binaries, datasets) to the repository, causing repository size to grow and clone operations to become slow. What is the BEST approach to manage this?

A.Use S3 as the source in CodePipeline and skip CodeCommit for binaries.
B.Store binaries in a separate CodeCommit repository.
C.Increase the repository size limit by requesting a quota increase.
D.Enable Git LFS in CodeCommit and configure the large files to use LFS.
AnswerD

Git LFS in CodeCommit replaces large binary files with small pointer files in the repository and stores the actual binary content in an S3 bucket managed by the service. When developers clone the repo, they only fetch pointers, keeping the repository small and clones fast; the actual binary is downloaded on demand when checking out a specific revision. This maintains Git's full versioning, branching, and commit atomicity while ensuring that the repository itself never bloats.

Why this answer

AWS CodeCommit supports Git Large File Storage (LFS), which replaces large files in the repository with text pointers while storing the actual binary content in a separate hosted storage backend. This keeps the repository lightweight, speeds up clone and fetch operations, and avoids hitting the default repository size limits. Enabling Git LFS is the recommended and best practice for managing large binary files in CodeCommit.

Exam trap

The trap here is that candidates often assume increasing quotas or splitting repositories will solve performance issues, but they fail to recognize that Git LFS is the only option that directly addresses the root cause—large binary files bloating the repository and slowing Git operations.

How to eliminate wrong answers

Option A is wrong because using S3 as the source in CodePipeline bypasses CodeCommit entirely, which breaks the existing developer workflow and version control history for binaries; it also does not solve the problem of slow clones from CodeCommit. Option B is wrong because storing binaries in a separate CodeCommit repository does not reduce the size impact on clone operations—each repository still contains the full binary history, and developers would need to clone both repositories, compounding the problem. Option C is wrong because increasing the repository size limit does not address the underlying issue of slow clones caused by large files; it only postpones hitting the limit while the repository continues to grow and performance degrades further.

1258
MCQmedium

A CloudFormation template includes the following resource: MySecurityGroup: Type: AWS::EC2::SecurityGroup Properties: GroupDescription: My security group SecurityGroupIngress: - IpProtocol: tcp FromPort: 443 ToPort: 443 CidrIp: 0.0.0.0/0 MyInstance: Type: AWS::EC2::Instance Properties: ImageId: ami-0abcdef1234567890 InstanceType: t2.micro SecurityGroupIds: !Ref MySecurityGroup The stack creation fails with the error shown. What is the cause?

A.The SecurityGroupIds property must be a list, but !Ref returns a single value.
B.The SecurityGroupIds property must be a list of security group names, not IDs.
C.The security group ingress rule is invalid because it allows all traffic.
D.The ImageId is missing, so the security group validation fails first.
AnswerA

The `SecurityGroupIds` property of an EC2 instance is typed as a list of security group IDs. When you use `!Ref` on a security group resource, CloudFormation resolves it to the security group's physical ID as a single string, not an array. Because the property requires a `List<AWS::EC2::SecurityGroup::Id>`, passing a bare `!Ref` causes a type-validation failure. To fix it, you must wrap the reference in a list literal, e.g., `SecurityGroupIds: [!Ref MySecurityGroup]`, or use `Fn::Split` if composing from a string.

Why this answer

The error occurs because the `SecurityGroupIds` property expects a list of security group IDs, but the `!Ref` intrinsic function returns a single security group ID (a string), not a list. In CloudFormation, `!Ref` for a security group returns its ID as a scalar value, so wrapping it in a list (e.g., `[!Ref MySecurityGroup]`) is required to satisfy the `List<String>` type constraint.

Exam trap

The trap here is that candidates assume `!Ref` automatically returns a list when the property expects one, but CloudFormation does not coerce scalar values into lists; you must explicitly provide a list literal.

How to eliminate wrong answers

Option A is correct because `SecurityGroupIds` requires a list, and `!Ref` returns a single value. Option B is wrong because `SecurityGroupIds` expects security group IDs, not names; the `SecurityGroups` property (deprecated) expects names, but `SecurityGroupIds` explicitly requires IDs. Option C is wrong because the ingress rule allowing TCP 443 from 0.0.0.0/0 is valid; it permits HTTPS traffic from anywhere, which is a common and allowed configuration.

Option D is wrong because the `ImageId` is provided (ami-0abcdef1234567890), and even if it were missing, CloudFormation would fail with a different error (e.g., 'ImageId is required'), not a security group validation error.

1259
MCQmedium

A company runs a microservices application on Amazon ECS with Fargate. The application includes a service that processes messages from an Amazon SQS queue. Recently, the processing time has increased, and the SQS queue depth is growing. The CloudWatch metrics show that the ECS service's CPU utilization is consistently around 70%, memory utilization is 80%, and the number of running tasks is at the maximum allowed (10). The service is configured with a target tracking scaling policy based on CPU utilization with a target value of 50%. However, the auto scaling does not seem to be adding tasks. The engineer checks the ECS service events and finds no scaling activity. What is the MOST likely reason the auto scaling is not working, and what action should be taken to resolve the issue?

A.The service has reached the maximum number of tasks defined in the auto scaling configuration; increase the maximum tasks.
B.The scaling policy is not properly configured; recreate it with a lower target value.
C.The CloudWatch metric is not being emitted correctly; check the metric namespace.
D.The ECS service is using Fargate, which does not support target tracking scaling policies.
AnswerA

The ECS service's Application Auto Scaling target tracking policy is capped by a maximum capacity of 10 tasks. Since the service is already running at that desired count of 10, the policy cannot scale out any further even though the CloudWatch metric is above the target value. To resolve the issue, increase the maximum tasks (for example, from 10 to 15) in the scaling configuration, which allows the policy to add more task instances.

Why this answer

The auto scaling is not adding tasks because the ECS service has already reached the maximum number of tasks defined in the auto scaling configuration (10). With CPU utilization at 70% and the target tracking policy set to 50%, the policy would normally trigger scale-out actions, but since the maximum task count is already hit, no scaling activity occurs. The engineer must increase the maximum tasks in the auto scaling configuration to allow further scale-out.

Exam trap

The trap here is that candidates may assume the scaling policy itself is misconfigured or that Fargate lacks support for target tracking, when in reality the issue is the hard cap on the maximum number of tasks preventing any scale-out action.

How to eliminate wrong answers

Option B is wrong because the target value of 50% is appropriate; lowering it would not resolve the issue since the policy is not being triggered due to the max task limit, not the target value. Option C is wrong because CloudWatch metrics are being emitted correctly (CPU utilization is visible at 70%), so the metric namespace is not the problem. Option D is wrong because Fargate fully supports target tracking scaling policies for ECS services; this is a supported and common configuration.

1260
MCQmedium

A company is using AWS Elastic Beanstalk with a custom platform. They need to install a third-party agent on all instances. The agent requires a configuration file that contains sensitive credentials. How should the DevOps engineer provide the configuration file to the agent?

A.Use instance user data to write the configuration file during instance launch.
B.Embed the configuration file in the application source code and deploy it with the application.
C.Use .ebextensions configuration files to download the configuration from a secure S3 bucket using an IAM instance role.
D.Use AWS Systems Manager Run Command to distribute the configuration file after instances are launched.
AnswerC

.ebextensions files are processed by Elastic Beanstalk during environment creation and every instance deployment, allowing you to use a container command to copy the configuration from a private S3 bucket. Using an IAM instance role with a least-privilege policy scoped to that bucket keeps credentials out of code, and the configuration can be updated independently of the application.

Why this answer

Ebextensions configuration files allow you to run custom commands and scripts during instance provisioning, and by combining this with an IAM instance role that grants read access to a secure S3 bucket, you can securely download the sensitive configuration file without embedding credentials in the source code or user data. This approach follows AWS best practices for handling secrets by avoiding hard-coded credentials and leveraging IAM roles for temporary, scoped access.

Exam trap

The trap here is that candidates often choose Option A (user data) because it seems like a simple provisioning step, but they overlook that user data is not encrypted and is visible in the EC2 console, making it unsuitable for secrets, whereas .ebextensions with S3 and IAM roles provide a secure, auditable method that aligns with the AWS shared responsibility model.

How to eliminate wrong answers

Option A is wrong because instance user data is stored in plain text and can be viewed by anyone with access to the EC2 console or instance metadata, making it insecure for sensitive credentials. Option B is wrong because embedding the configuration file in the application source code exposes the credentials in version control systems and deployment artifacts, violating security best practices. Option D is wrong because AWS Systems Manager Run Command is an operational tool for ad-hoc or scheduled tasks, not a provisioning mechanism; it would introduce a race condition if the agent starts before the configuration is delivered, and it does not integrate with the Elastic Beanstalk lifecycle hooks to ensure the file is present at boot.

1261
MCQmedium

A DevOps engineer is troubleshooting an issue where an EC2 instance cannot access an S3 bucket. The instance has an IAM role attached with a policy that allows s3:GetObject. The S3 bucket policy explicitly denies access to the instance's role. What is the result?

A.Access is denied only if the bucket is encrypted
B.Access is allowed only if the instance is in the same region
C.Access is allowed because the IAM role allows it
D.Access is denied because the bucket policy explicitly denies
AnswerD

The bucket policy contains an explicit deny statement for the principal or action being attempted, and AWS IAM policy evaluation gives explicit deny statements absolute precedence over any allow statements from identity-based policies, resource-based policies, or permission boundaries. Even though the IAM role allows the s3:GetObject call, the explicit deny in the bucket policy forces the final decision to AccessDenied. This precedence is a deterministic, non-configurable part of AWS's authorization engine.

Why this answer

An explicit deny in any policy overrides any allow. The bucket policy deny takes precedence over the IAM role allow, so access is denied. Evaluation logic is that an explicit deny prevents access.

1262
MCQhard

A company has a multi-account AWS environment managed by AWS Organizations. The DevOps team uses AWS CloudFormation StackSets to deploy a standard VPC across all member accounts. The security team has noticed that in some accounts, the VPC is being modified after deployment, allowing inbound SSH access from the internet. The team wants to automatically detect and remediate these changes. The current setup includes: AWS Config enabled in all accounts with a rule that checks for unrestricted SSH access; an SNS topic in the management account that receives compliance change notifications; and a Lambda function in the management account that can remediate by updating the security group rules. However, the remediation is not working consistently. What is the most likely reason, and what is the best solution?

A.The AWS Config rule is not evaluating correctly in member accounts.
B.The Lambda function's IAM role does not have permissions to modify security groups in member accounts.
C.The SNS topic is not delivering messages to the Lambda function due to cross-account access issues.
D.CloudFormation StackSets is overriding the changes, causing a race condition.
AnswerB

Remediation actions in AWS Config require the Lambda function to have an IAM role that is assumable in every member account where the rule runs. When using the AWS-provided remediation action 'AWS-ConfigureSecurityGroupChanges' or a custom Lambda function, that role must include permissions such as ec2:AuthorizeSecurityGroupIngress, ec2:RevokeSecurityGroupIngress, and similar actions scoped to the target security groups. Without those permissions, the Lambda execution fails with an AccessDenied error even though the event was delivered and the function started. This is the most direct cause of the failure because the rule is detecting and triggering correctly, but the remediation cannot modify the resources.

Why this answer

The Lambda function in the management account needs cross-account permissions to modify security groups in member accounts. The most likely issue is that the Lambda function's IAM role does not have the required permissions. The best solution is to use AWS Config conformance packs with remediation actions deployed to each member account, allowing local remediation.

Option A is incorrect because the Config rule itself detects the changes. Option C is incorrect because the SNS topic can deliver messages cross-account with proper permissions, but the remediation fails due to the Lambda role's lack of permissions. Option D is incorrect because StackSets are for initial deployment, not for ongoing compliance.

1263
MCQeasy

A company uses CloudWatch Logs to store application logs. The security team requires that logs be encrypted at rest using a customer-managed KMS key. What must be done to enable this?

A.Enable encryption on the log group using the default AWS managed key.
B.Use a third-party encryption tool before sending logs to CloudWatch.
C.Create a new log group in a region where KMS is enabled.
D.Associate a customer-managed KMS key with the log group and update the key policy to allow CloudWatch Logs to use it.
AnswerD

To encrypt a CloudWatch Logs log group with a customer-managed KMS key, you must create or select a KMS key, update its key policy to grant the CloudWatch Logs service principal permissions such as kms:Encrypt, kms:Decrypt, kms:GenerateDataKey*, and kms:DescribeKey, and then associate that key with the log group using the console or the associate-kms-key API. This server-side encryption protects log data at rest and allows CloudWatch Logs to decrypt the data internally for features like log queries.

Why this answer

CloudWatch Logs supports encryption at rest using a customer-managed KMS key. To enable this, you must associate the KMS key with the log group via the CloudWatch Logs console or API, and you must update the key policy to grant CloudWatch Logs the necessary permissions (kms:Encrypt, kms:Decrypt, kms:ReEncrypt*, kms:GenerateDataKey*, and kms:DescribeKey). Without this key policy update, CloudWatch Logs cannot use the key to encrypt the log data at rest.

Exam trap

The trap here is that candidates often assume encryption is automatically applied when a KMS key exists in the account, but they overlook the critical step of updating the key policy to grant CloudWatch Logs service principal permissions to use the key.

How to eliminate wrong answers

Option A is wrong because using the default AWS managed key does not meet the security team's requirement for a customer-managed KMS key; the default key is AWS-owned and not customer-managed. Option B is wrong because using a third-party encryption tool before sending logs to CloudWatch would result in encrypted log data that CloudWatch Logs cannot index, search, or process natively, defeating the purpose of centralized logging. Option C is wrong because KMS is available in all AWS regions where CloudWatch Logs is supported; creating a new log group in a different region does not enable customer-managed KMS encryption—you must explicitly associate a customer-managed key with the log group.

1264
MCQhard

A DevOps engineer is troubleshooting an AWS CloudFormation stack that failed to create. The error message indicates that a resource 'AWS::Lambda::Function' timed out while being created. The Lambda function code is packaged as a ZIP file in Amazon S3. What is the most likely cause?

A.The Lambda function has a very short timeout (e.g., 3 seconds) configured in the function properties.
B.The Lambda function's execution role does not have permission to download the ZIP file from S3.
C.The Lambda deployment package is very large, causing the S3 download to exceed the resource creation timeout.
D.The CloudFormation service role does not have permissions to create Lambda functions.
AnswerC

If the ZIP file is exceptionally large (approaching Lambda's 50 MB compressed limit), the time CloudFormation takes to download it from S3 and create the Lambda resource can exceed the stack resource creation timeout. This manifests as a 'Resource creation timed out' error in the stack event, even though the function is valid. In contrast, a small package deploys quickly regardless of the Lambda function's configured timeout or role permissions.

Why this answer

AWS CloudFormation has a default timeout for creating resources, and if the Lambda deployment package is very large, downloading it from S3 can exceed that timeout. Option A is incorrect because the Lambda function's timeout setting (e.g., 3 seconds) applies to function execution, not to the creation process; the creation timeout is controlled by CloudFormation. Option B is incorrect because if the execution role lacks permissions to download the ZIP file, it would result in an access denied error, not a timeout.

Option D is incorrect because the CloudFormation service role permissions affect stack operations broadly, but they do not directly cause a resource-specific timeout; the timeout here is due to package size.

1265
MCQeasy

A startup uses AWS CloudFormation to manage its infrastructure. The team stores stack templates in an S3 bucket and creates stacks using the AWS CLI. Recently, a developer accidentally deleted a CloudFormation stack, causing a production outage. The team wants to prevent accidental stack deletions while allowing authorized users to delete stacks after approval. What is the MOST effective solution?

A.Enable termination protection on the stack.
B.Implement a manual review process for all stack deletion requests.
C.Apply a Service Control Policy that denies the cloudformation:DeleteStack action.
D.Use an IAM policy that denies DeleteStack for all users.
AnswerC

A service control policy that denies `cloudformation:DeleteStack` is correct because SCPs act as an account/OU-level permissions boundary that applies to every principal in the organization, regardless of their IAM policies, and cannot be overridden by account administrators. The management account is exempt from SCPs, so you must protect it separately, and you can add a condition key—such as `aws:PrincipalArn`—to whitelist a break-glass role while denying everyone else. This gives centralized, preventive control that IAM policies and termination protection cannot match.

Why this answer

The most effective because a Service Control Policy (SCP) can deny the cloudformation:DeleteStack action at the AWS Organizations level, which applies even to the root user and all IAM users/roles in the account. This prevents accidental deletion by any user, including administrators, without needing to rely on a manual process. In contrast, option A (termination protection) can be disabled by users with permission to update the stack, option B (manual review) is not automated and depends on human compliance, and option D (IAM policy) can be bypassed by users with full administrative privileges.

1266
Multi-Selectmedium

A company is designing a resilient architecture for a web application that uses Amazon RDS for MySQL. The application must be able to withstand the loss of an entire AWS Region. Which TWO actions should the company take?

Select 2 answers
A.Use RDS Proxy to pool database connections.
B.Configure automated backups to be copied to another Region.
C.Enable Multi-AZ deployment for the RDS instance.
D.Create a Cross-Region Read Replica.
E.Enable deletion protection on the RDS instance.
AnswersB, D

Allows recovery from backups in another Region.

Why this answer

To withstand the loss of an entire AWS Region, the company must have a disaster recovery strategy that includes cross-region data replication. Option B is correct because copying automated backups to another Region ensures that a recoverable copy of the database exists in a different geographic area, allowing restoration in a separate Region if the primary Region fails. Option D is correct because a Cross-Region Read Replica provides a live, asynchronously replicated copy of the database in another Region, which can be promoted to a standalone primary instance during a regional outage, minimizing recovery time.

Exam trap

The trap here is that candidates often confuse Multi-AZ (which provides high availability within a Region) with cross-region disaster recovery, leading them to incorrectly select Multi-AZ as a solution for regional failure.

1267
MCQhard

A DevOps team is designing a CI/CD pipeline for a microservices application. Each service is stored in a separate repository. The team wants to build and test only the services that changed in a given commit. Which AWS solution is MOST efficient and cost-effective?

A.Use AWS CodeCommit triggers with Amazon SNS to send notifications and then manually trigger builds.
B.Use AWS CodeBuild with a webhook that triggers builds only for repositories where files changed, using buildspec filters.
C.Use AWS CodePipeline with a single pipeline that builds all services on every commit.
D.Use Amazon EventBridge to detect repository changes and trigger AWS Lambda functions that determine which services changed.
AnswerB

AWS CodeBuild webhooks natively support filter groups that include FILEPATH patterns, allowing you to trigger a build only when a committed file under a specified path (e.g., 'services/payment/**') changes. Each microservice can have its own CodeBuild project and webhook, so commits to unrelated services do not waste compute time. Additionally, the buildspec can further refine the build with conditional phases, giving precise, automated control without custom infrastructure.

Why this answer

AWS CodeBuild webhooks can be configured with buildspec filter patterns (e.g., using `git diff` or path-based globs) to trigger builds only for repositories where files changed. This avoids unnecessary builds for unchanged services, making it both efficient and cost-effective by minimizing compute time and resource usage.

Exam trap

The trap here is that candidates may overcomplicate the solution by choosing EventBridge and Lambda (Option D) for change detection, missing that CodeBuild webhooks with buildspec filters provide a simpler, built-in, and more cost-effective mechanism for selective builds.

How to eliminate wrong answers

Option A is wrong because manually triggering builds via SNS notifications defeats automation and is neither efficient nor cost-effective for a CI/CD pipeline. Option C is wrong because a single pipeline building all services on every commit wastes resources and time, as unchanged services would be rebuilt unnecessarily. Option D is wrong because while EventBridge and Lambda can detect changes, this adds complexity and cost (Lambda invocations, custom logic) compared to the built-in webhook filtering in CodeBuild, which is more straightforward and cost-effective.

1268
Multi-Selectmedium

A company uses AWS CodePipeline with multiple stages. The pipeline includes a Beta stage that deploys to a test environment and a Prod stage. The team wants to require manual approval before the Prod stage. Which TWO actions should be taken to implement this? (Choose TWO.)

Select 2 answers
A.Ensure that the IAM user or role performing the approval has codepipeline:PutApprovalResult permissions.
B.Use CloudWatch Events to trigger a Lambda function that requires manual sign-off.
C.Set the Prod stage to only run on manual invocation.
D.Add a manual approval action in the pipeline stage between Beta and Prod.
E.Configure a CodeCommit approval rule template to require approval before merging.
AnswersA, D

The approver needs permissions to submit the approval result.

Why this answer

The IAM user or role that performs the manual approval action in CodePipeline must have the `codepipeline:PutApprovalResult` permission. This permission allows the user to submit the approval or rejection result to the pipeline, which is required to advance the pipeline to the Prod stage. Without this permission, the approval action cannot be completed, and the pipeline will remain stuck.

Exam trap

The trap here is that candidates often confuse manual approval actions with other approval mechanisms like CodeCommit approval rules or Lambda-based automation, but CodePipeline's manual approval is a distinct action type that requires explicit IAM permissions and a human-in-the-loop step.

1269
MCQhard

Refer to the exhibit. A developer runs the AWS CLI command to start a build in AWS CodeBuild. The build project 'my-project' uses an S3 bucket as the source. What is the MOST likely cause of the error?

A.The CodeBuild service role does not have s3:GetObject permission on the source bucket.
B.The S3 bucket name is misspelled in the build project configuration.
C.The developer's IAM user does not have s3:GetObject permission.
D.The S3 bucket is in a different region than the CodeBuild project.
AnswerA

The CodeBuild service role is the IAM role that the build service assumes at runtime to perform actions on your behalf, including fetching source code from Amazon S3. If the role's attached policy lacks an s3:GetObject action on the source bucket, the build start fails with an AccessDenied error that names the role. This is the correct diagnosis because CodeBuild's access to source objects is governed entirely by the service role, not by the caller's user-level S3 permissions.

Why this answer

The error occurs because CodeBuild needs to download the source code from the S3 bucket during the build. The CodeBuild service role, not the developer's IAM user, makes the s3:GetObject API call to retrieve the source object. Without this permission on the service role, the build fails with an access denied error.

Exam trap

The trap here is that candidates confuse the developer's IAM permissions with the CodeBuild service role's permissions, assuming the developer's credentials are used for all actions, when in fact CodeBuild uses its own role for resource access.

How to eliminate wrong answers

Option B is wrong because a misspelled bucket name would cause a 'NoSuchBucket' error, not an access denied error. Option C is wrong because the developer's IAM user only needs permission to start the build (codebuild:StartBuild), not to read the source directly; the service role handles S3 access. Option D is wrong because CodeBuild can access S3 buckets in any region as long as the bucket policy and service role permissions allow cross-region access; there is no regional restriction for S3 sources in CodeBuild.

1270
MCQmedium

A company uses AWS Lambda functions to process streaming data from Amazon Kinesis Data Streams. The Lambda function processes records in batches and writes the results to an Amazon DynamoDB table. Recently, the operations team noticed that the Lambda function is experiencing a high number of throttling errors (HTTP 400) when writing to DynamoDB. The DynamoDB table has on-demand capacity mode enabled. The CloudWatch metrics show that the DynamoDB consumed write capacity is well below the provisioned limits, but the Lambda function's error rate is increasing. The Lambda function's reserved concurrency is set to 100, and the function's timeout is 1 minute. The Kinesis stream has 10 shards. What is the MOST likely cause of the throttling errors?

A.The DynamoDB table is experiencing hot partitions due to uneven access patterns.
B.The Lambda function's timeout is too short, causing the function to retry and overload DynamoDB.
C.The Lambda function's reserved concurrency is too high, causing too many concurrent invocations.
D.The Kinesis stream's batch size is too large, causing the Lambda function to write too many records at once.
AnswerA

DynamoDB on-demand capacity protects against table-level throttling but still enforces a per-partition limit of about 1,000 write capacity units. When access patterns are uneven, such as a single partition key receiving a disproportionate share of writes from the Kinesis stream, that partition hits its limit and throttles requests even though the overall table has plenty of capacity. Adaptive capacity can redistribute some of this load, but it is not instantaneous and does not fully prevent throttling during sharp spikes.

Why this answer

Even with on-demand capacity, DynamoDB has per-partition throughput limits. When many writes target the same partition key (hot partition), the partition can throttle requests, resulting in HTTP 400 errors. This is consistent with the CloudWatch metrics showing overall consumed write capacity below provisioned limits but increasing error rates.

Option B is incorrect because a 1-minute timeout is standard and does not directly cause DynamoDB throttling. Option C is incorrect because reserved concurrency of 100 is reasonable for a 10-shard stream and does not exceed DynamoDB's overall capacity. Option D is incorrect because the batch size affects how many records are processed per invocation but does not cause DynamoDB throttling unless combined with hot partitions.

Exam trap

A common trap is assuming on-demand capacity eliminates all throttling. However, on-demand only handles overall capacity; individual partitions can still throttle if they exceed 3000 RCU or 1000 WCU per second.

1271
MCQmedium

A company uses AWS Systems Manager Patch Manager to patch EC2 instances. During a patching window, some instances fail to apply patches. The engineer checks the SSM Agent logs and sees 'ERROR: Failed to download patch files from the source.' What is the most likely cause?

A.The IAM instance profile does not grant ssm:UpdateInstanceInformation.
B.The SSM Agent is outdated.
C.The patch baseline is configured incorrectly.
D.The security group or NACL is blocking outbound HTTPS traffic (port 443).
AnswerD

The SSM Agent downloads patch binaries directly from the configured patch repositories, such as Windows Update or Linux package mirrors, using HTTPS on TCP port 443. If the instance's security group or subnet NACL blocks outbound HTTPS, the agent cannot reach these repositories, leading to a patch download failure. This is the most common network-level cause, especially when the instance can otherwise communicate with the Systems Manager API but fails specifically during patch retrieval.

Why this answer

The error 'Failed to download patch files from the source' indicates that the SSM Agent on the instance cannot reach the patch source repositories (e.g., Windows Update, Amazon Linux repos, or custom patch sources). Systems Manager Patch Manager requires outbound HTTPS (port 443) connectivity to download patch metadata and binaries. If a security group or NACL blocks this traffic, the download fails, producing this exact error in the agent logs.

Exam trap

The trap here is that candidates often assume the error is due to IAM permissions or patch baseline misconfiguration, overlooking that the specific 'Failed to download' message is a classic symptom of network egress blocking, not authorization or configuration issues.

How to eliminate wrong answers

Option A is wrong because ssm:UpdateInstanceInformation is required for the instance to register and send heartbeat data to Systems Manager, but it does not control the ability to download patch files; the error is about download failure, not registration. Option B is wrong because an outdated SSM Agent would typically produce errors about agent version incompatibility or missing features, not a specific 'Failed to download patch files from the source' message; the agent can still attempt downloads. Option C is wrong because a misconfigured patch baseline might cause patches to be incorrectly approved or rejected, but the error message points to a network connectivity issue preventing download, not a baseline configuration problem.

1272
MCQeasy

A DevOps engineer is tasked with setting up monitoring for a serverless application that uses AWS Lambda, Amazon API Gateway, and Amazon DynamoDB. The engineer needs to create a centralized dashboard that displays the number of Lambda invocations, API Gateway request counts, and DynamoDB consumed read/write capacity units. The dashboard should be accessible to the operations team without requiring AWS Management Console login. The engineer also wants to set up email alerts when the DynamoDB consumed capacity exceeds 80% of the provisioned capacity. Which solution meets these requirements with the LEAST operational overhead?

A.Use Amazon QuickSight to connect to CloudWatch metrics and create a dashboard with email alerts.
B.Use CloudWatch Logs Insights to query the logs of each service and create a dashboard from the results.
C.Create a CloudWatch dashboard and share it using Amazon Cognito to grant access to the operations team.
D.Create a CloudWatch dashboard with the relevant metrics and set CloudWatch alarms on DynamoDB consumed capacity. Share the dashboard as a public read-only dashboard.
AnswerD

This is the correct solution because CloudWatch natively supports creating dashboards that display multiple operational metrics, and alarms on DynamoDB consumed capacity can be configured to trigger SNS notifications (e.g., email) when thresholds are exceeded. The dashboard can be shared as a public read-only dashboard using the CloudWatch console's 'Share' feature, which generates a URL that grants view-only access without requiring IAM credentials or Cognito. This directly addresses both the need for at-a-glance monitoring and threshold-based alerting on DynamoDB capacity, making it the most operationally sound and low-overhead option.

Why this answer

CloudWatch Dashboards can be shared publicly as a read-only dashboard without requiring AWS credentials. The metrics for Lambda, API Gateway, and DynamoDB are automatically available in CloudWatch, and no additional setup is needed. Alarms can be set on DynamoDB's ConsumedReadCapacityUnits and ConsumedWriteCapacityUnits metrics to trigger email alerts via SNS.

Option A (QuickSight) is incorrect because it requires additional setup and cost, and is not the simplest approach for this use case. Option B (CloudWatch Logs Insights) is incorrect because it is designed for querying log data, not for creating a metrics dashboard; it would not directly display the required metrics. Option C is incorrect because sharing a CloudWatch dashboard does not require Amazon Cognito; dashboards can be shared via a public URL without additional authentication mechanisms.

1273
MCQmedium

An S3 bucket has the above bucket policy. What is the effect of this policy?

A.It allows anonymous access to the bucket over HTTPS
B.It denies all access to the bucket regardless of protocol
C.It denies access to the bucket if the request is not sent over HTTPS
D.It allows access only from specific IP addresses
AnswerC

This statement uses 'Deny' with the condition 'aws:SecureTransport': 'false', meaning that any time S3 sees a request to this bucket that did not use TLS/SSL, the condition is satisfied and the explicit deny applies, causing the request to be rejected. HTTPS requests have SecureTransport set to true, so they are not affected by this particular statement and may be allowed or denied based on other applicable policies. This is a standard pattern to enforce HTTPS-only access to S3 buckets.

Why this answer

The bucket policy denies all S3 actions when the request is not sent over HTTPS (i.e., when aws:SecureTransport is false). Therefore, the policy enforces HTTPS for all access to the bucket. Option C correctly states this effect.

Option A is incorrect because the policy does not allow anonymous access; it only denies non-HTTPS requests. Option B is incorrect because the policy does not deny all access; it only denies requests that are not HTTPS. Option D is incorrect because the policy does not reference IP addresses.

1274
MCQhard

A DevOps team is implementing a CI/CD pipeline for a microservices architecture on AWS ECS. They want to ensure zero-downtime deployments and automatic rollback if health checks fail. Which combination of services should they use?

A.AWS CodePipeline with ECS rolling update and manual rollback.
B.AWS CodeDeploy with ECS blue/green deployment and CloudWatch alarms for automatic rollback.
C.AWS Elastic Beanstalk with rolling deployment and enhanced health reporting.
D.AWS CloudFormation with ECS service update and SNS notification on failure.
AnswerB

AWS CodeDeploy's ECS blue/green deployment creates a new 'green' task set with the new application version while preserving the original 'blue' task set and its target group. During the deployment, CodeDeploy shifts load balancer traffic from blue to green using a canary or linear strategy, and you can define post-deployment hooks and wait times. CloudWatch alarms, such as a failing health check on the green service or increased error rate, trigger a CodeDeploy rollback that automatically reroutes traffic to the blue task set and kills the green tasks. This gives microservices teams zero-downtime release with fully automated rollback—directly meeting the requirement.

Why this answer

AWS CodeDeploy supports blue/green deployments for ECS, which creates a new replacement task set alongside the original, allowing traffic to shift only after health checks pass. CloudWatch alarms can be configured to trigger an automatic rollback if the new deployment fails health checks, ensuring zero-downtime and automated recovery.

Exam trap

The trap here is that candidates often assume AWS CodePipeline with rolling update (Option A) can handle automatic rollback, but CodePipeline itself does not manage deployment strategies or health-check-based rollbacks—those are handled by CodeDeploy, which is specifically designed for blue/green deployments with automatic rollback capabilities.

How to eliminate wrong answers

Option A is wrong because AWS CodePipeline with ECS rolling update does not support automatic rollback on health check failure; manual intervention is required, violating the automatic rollback requirement. Option C is wrong because AWS Elastic Beanstalk is a PaaS service for single applications, not designed for microservices on ECS, and its rolling deployment with enhanced health reporting lacks native blue/green deployment and automatic rollback for ECS. Option D is wrong because AWS CloudFormation with ECS service update can update the service but does not provide built-in blue/green deployment or automatic rollback based on health checks; SNS notification only alerts, it does not trigger rollback.

1275
MCQmedium

Refer to the exhibit. A DevOps engineer created an IAM role 'MyLambdaRole' for a Lambda function. The Lambda function needs to write logs to CloudWatch Logs. However, the function is not able to create log streams. What is the most likely missing configuration?

A.The role name is not prefixed with 'AWSLambda'.
B.The role does not have an inline or managed policy that grants permissions for CloudWatch Logs.
C.The role ARN is incorrectly formatted.
D.The trust policy does not allow Lambda to assume the role.
AnswerB

The correct issue is that this Lambda execution role lacks any inline or managed policy granting the required CloudWatch Logs permissions. Without a policy allowing logs:CreateLogGroup, logs:CreateLogStream, and logs:PutLogEvents, Lambda cannot write execution logs to CloudWatch, even though the trust policy is valid. This will cause runtime failures or missing log output, and is a common misconfiguration.

Why this answer

The IAM role must have an inline or managed policy that grants permissions for CloudWatch Logs actions such as logs:CreateLogStream and logs:PutLogEvents. Option A is incorrect because the role name does not need a prefix; the trust policy is what matters. Option C is incorrect because the role ARN format does not affect log stream creation.

Option D is incorrect because the trust policy allowing Lambda to assume the role is separate from the permissions to write logs; the question states the function is not able to create log streams, which indicates a permissions issue within the role's policies.

Page 16

Page 17 of 20

Page 18