Courseiva

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

1083 questions total · 15pages · All types, answers revealed

Page 11

Page 12 of 15

Page 13
826
Multi-Selectmedium

A company is using AWS KMS to encrypt data in Amazon S3. The security team wants to ensure that the KMS key can only be used from within the company's VPC. What should be done? (Choose TWO.)

Select 2 answers
A.Attach a security group to the KMS key.
B.Modify the KMS key policy to include a condition that requires the kms:ViaService to be from the VPC endpoint.
C.Configure the S3 bucket policy to allow only requests from the VPC.
D.Create a service control policy (SCP) that denies KMS operations from outside the VPC.
E.Create a VPC endpoint for AWS KMS.
AnswersB, E

This condition restricts use of the key to requests coming through the VPC endpoint.

Why this answer

Options B and E are correct. To restrict KMS key usage to within the VPC, you first create a VPC endpoint for AWS KMS (Option E) to allow private connectivity. Then, you modify the KMS key policy to include a condition that requires the request to originate from that VPC endpoint, using the kms:ViaService condition key (Option B).

Option A is wrong because security groups do not apply to KMS keys; they are used for EC2 instances and network interfaces. Option C is wrong because S3 bucket policies cannot restrict which KMS key is used for encryption; they can only restrict S3 actions. Option D is wrong because service control policies (SCPs) apply at the organizational level and cannot restrict KMS key usage to a specific VPC; key policies are the correct mechanism.

827
MCQeasy

Refer to the exhibit. A DevOps engineer applies the IAM policy shown to an S3 bucket to enforce server-side encryption. However, users report that some uploads succeed without encryption. What is the most likely reason?

A.The policy uses StringEquals instead of StringNotEquals.
B.The policy only allows the action but does not deny actions that do not meet the condition.
C.The resource ARN is incorrect; it should be the bucket ARN.
D.The action should be s3:PutEncryptedObject instead of s3:PutObject.
AnswerB

This is the core problem: IAM is default-deny, so this Allow statement only grants the upload when the condition is met; it does nothing to block uploads that fail the condition if another policy grants them. To enforce encryption, you must include an explicit Deny for s3:PutObject without the required encryption condition, because Deny always overrides Allow. Merely adding a condition to an Allow does not constrain other permissions.

Why this answer

The IAM policy only allows the s3:PutObject action when the encryption condition is met, but it does not include an explicit Deny statement to block uploads that do not satisfy the condition. In IAM, an Allow statement with a condition does not automatically deny requests that fail the condition; it simply does not apply the Allow. If there is another policy (e.g., a bucket policy or an identity-based policy) that grants s3:PutObject without the encryption condition, or if the default S3 behavior permits unencrypted uploads (since S3 does not require encryption by default), then unencrypted uploads can still succeed.

To enforce encryption, you must add a Deny statement with a condition like `StringNotEquals` on `s3:x-amz-server-side-encryption` to explicitly reject requests that lack the required encryption header.

Exam trap

The trap here is that candidates assume an Allow statement with a condition implicitly denies requests that don't meet the condition, but AWS IAM requires an explicit Deny to block non-compliant requests, and the absence of that Deny is the root cause of the enforcement failure.

How to eliminate wrong answers

Option A is wrong because using StringEquals is correct for allowing only requests with the specified encryption value; the issue is not the operator but the lack of a Deny statement. Option C is wrong because the resource ARN in the policy is correct for the bucket itself (e.g., `arn:aws:s3:::bucket-name`), and the action s3:PutObject applies to objects, but the policy's Resource field can be the bucket ARN or the bucket ARN with a wildcard for objects; the given ARN is not the root cause of the failure to enforce encryption. Option D is wrong because there is no such action as s3:PutEncryptedObject in AWS S3; encryption is controlled via request headers and conditions, not a separate API action.

828
Multi-Selecthard

Which THREE strategies can improve the resilience of an Amazon RDS for PostgreSQL database?

Select 3 answers
A.Disable automated backups to save costs
B.Enable automated backups with a retention period
C.Create read replicas in another Availability Zone
D.Use a single-AZ instance to reduce complexity
E.Enable Multi-AZ deployment
AnswersB, C, E

Enabling automated backups with a configured retention period allows Amazon RDS to continuously capture transaction logs and perform daily snapshots, enabling you to restore to any point in time within the retention window (e.g., the last 35 days). This provides a granular RPO, sometimes as low as seconds, because the recovery process replays transaction logs up to the desired timestamp. Backup files are stored in Amazon S3 with redundancy, and the time to recover (RTO) is typically minutes, making this a fundamental resilience strategy against logical errors and regional data loss.

Why this answer

Multi-AZ deployment (E) provides automatic failover to a standby instance in a different Availability Zone, enhancing availability. Automated backups with a retention period (B) enable point-in-time recovery, reducing data loss. Read replicas in another Availability Zone (C) offload read traffic and can be promoted to a standalone instance during a disaster.

Option A is wrong because disabling backups removes recovery capability, sacrificing resilience. Option D is wrong because a single-AZ instance has no failover and is less resilient.

829
MCQhard

A company uses AWS CloudFormation to create a stack with a Lambda function that uses a VPC. The stack creation fails with 'CREATE_FAILED: The provided execution role does not have permissions to call ec2:CreateNetworkInterface on the resource'. What is the likely cause?

A.The VPC does not have a subnet with internet access.
B.The CloudFormation template does not specify a security group.
C.The Lambda function code has a syntax error.
D.The Lambda execution role is missing the ec2:CreateNetworkInterface permission.
AnswerD

When a Lambda function is configured with VPC settings, the AWS Lambda service must create an elastic network interface (ENI) in each subnet on the function's behalf, which requires the execution role to have the `ec2:CreateNetworkInterface` permission. Without this permission, CloudFormation receives an 'Ec2.CreateNetworkInterface is not authorized' error and fails the stack creation, because the function resource cannot be provisioned. The role also needs `ec2:DescribeNetworkInterfaces` and `ec2:DeleteNetworkInterface` for cleanup, but the missing `CreateNetworkInterface` action is the direct blocker.

Why this answer

When a Lambda function is configured to run inside a VPC, it requires the `ec2:CreateNetworkInterface` permission to create an Elastic Network Interface (ENI) in the VPC subnets. The error message explicitly states that the execution role lacks this permission, which is a required IAM action for VPC-enabled Lambda functions. Without this permission, CloudFormation cannot provision the ENI, causing the stack creation to fail.

Exam trap

The trap here is that candidates may confuse network connectivity issues (like missing internet access or security groups) with IAM permission errors, but the error message explicitly names the missing permission, making D the only technically correct answer.

How to eliminate wrong answers

Option A is wrong because the error is about missing IAM permissions, not about subnet internet access; Lambda functions in a VPC do not need internet access unless they explicitly require it (e.g., via a NAT gateway). Option B is wrong because while a security group is required for VPC-enabled Lambda, the error message specifically points to a missing IAM permission, not a missing security group specification. Option C is wrong because a syntax error in the Lambda code would cause a different error (e.g., 'CREATE_FAILED: Invalid function code' or a runtime error), not a permission-related failure during stack creation.

830
MCQeasy

A company uses AWS OpsWorks for configuration management. The operations team needs to apply a configuration change to all instances in a layer without downtime. Which approach should they use?

A.Use a custom Chef recipe and run it on the layer using OpsWorks 'Run Command'.
B.Use an Auto Scaling lifecycle hook to apply the change during instance launch.
C.Clone the layer and update the clone with the new configuration, then switch traffic.
D.SSH into each instance and manually apply the change.
AnswerA

Use a custom Chef recipe and run it on the layer using OpsWorks 'Run Command' is correct because OpsWorks Stacks can execute a recipe on any currently online instance without waiting for a lifecycle event. This converges the specified layer's existing instances to the updated configuration immediately, and Chef's idempotent execution ensures only necessary changes are applied. You can target a single instance, a whole layer, or use custom Chef JSON to pass parameters.

Why this answer

The correct approach is to use a custom Chef recipe and run it on the layer using OpsWorks 'Run Command'. This allows applying configuration changes to all instances in the layer without downtime, as OpsWorks executes the recipe on each instance without requiring instance recreation. Option B is incorrect because Auto Scaling lifecycle hooks are used to execute actions during instance launch or termination, not for runtime configuration updates.

Option C is incorrect because cloning a layer creates a new layer and does not apply changes to existing instances; switching traffic would involve additional steps and potential downtime. Option D is incorrect because manually SSHing into each instance is error-prone, not scalable, and violates best practices for configuration management.

831
Multi-Selecteasy

A company is using AWS CodeBuild to build a Docker image and push it to Amazon ECR. The buildspec.yaml includes commands to build and tag the image. However, the push to ECR fails with an authentication error. Which TWO actions should the DevOps engineer take to resolve this?

Select 2 answers
A.Configure the ECR repository as public.
B.Add a command in the buildspec to run 'aws ecr get-login-password --region <region> | docker login --username AWS --password-stdin <account>.dkr.ecr.<region>.amazonaws.com'.
C.Create an ECR lifecycle policy to expire untagged images.
D.Ensure the CodeBuild service role has permissions for ecr:GetAuthorizationToken and ecr:Push.
E.Run 'docker login' with ECR credentials in the buildspec.
AnswersB, D

This command is the standard way to authenticate Docker to an ECR registry. It invokes the AWS CLI to call ecr:GetAuthorizationToken, which returns a base64-encoded password valid for 12 hours, and pipes it directly to docker login using the --password-stdin flag to avoid exposing the token in process listings. The username must be AWS and the registry URL must include the account ID and region. With proper IAM permissions, this makes the subsequent docker push/build step succeed.

Why this answer

The `aws ecr get-login-password` command retrieves a temporary authentication token from the ECR service, which is then piped to `docker login` to authenticate the Docker client against the private ECR registry. This is the standard AWS-recommended method for authenticating Docker to ECR in automated build environments like CodeBuild, as it avoids hardcoding long-lived credentials.

Exam trap

The trap here is that candidates may think simply running `docker login` with static credentials (Option E) is sufficient, but they overlook that ECR requires a dynamically generated token via `get-login-password`, and that the CodeBuild service role must have the correct IAM permissions (Option D) for the authentication flow to succeed.

832
MCQeasy

A DevOps team is designing an incident response plan for a critical microservices architecture. They need to automatically collect and analyze logs from all services during an incident. Which solution should they use?

A.Stream logs to Amazon Kinesis Data Firehose and analyze with Amazon OpenSearch Service.
B.Store logs in Amazon S3 and use Amazon Athena to query them.
C.Use AWS Systems Manager Run Command to execute log collection scripts on each instance.
D.Centralize logs in Amazon CloudWatch Logs and use CloudWatch Logs Insights for real-time querying.
AnswerD

Amazon CloudWatch Logs centralizes log streams from EC2 instances, Lambda, and other AWS services via the CloudWatch agent, making logs available for query within seconds of ingestion. CloudWatch Logs Insights provides an interactive, purpose-built query engine that can search, filter, and aggregate log events across multiple log groups using a simple query language, without requiring external infrastructure. This combination supports fast, exploratory incident analysis, real-time alarming via metric filters, and full retention options—making it the most direct and operationally ready choice.

Why this answer

Amazon CloudWatch Logs provides a centralized log management service that integrates natively with AWS services. During an incident, CloudWatch Logs Insights enables real-time, ad-hoc querying and analysis of logs from all microservices without needing to set up additional infrastructure, making it the most efficient solution for incident response.

Exam trap

The trap here is that candidates often over-engineer the solution by choosing complex streaming or analytics services (like Kinesis or Athena) for real-time incident analysis, when the native CloudWatch Logs Insights service is designed specifically for this use case with minimal setup and lower latency.

How to eliminate wrong answers

Option A is wrong because Amazon Kinesis Data Firehose is a streaming data delivery service that requires additional configuration to buffer and deliver logs to Amazon OpenSearch Service, adding latency and complexity not ideal for real-time incident analysis. Option B is wrong because storing logs in Amazon S3 and querying with Athena is designed for batch analytics, not real-time querying, and incurs significant latency due to S3 eventual consistency and Athena's per-query overhead. Option C is wrong because AWS Systems Manager Run Command is a one-time or scheduled command execution tool, not a continuous log collection and analysis solution, and it requires manual intervention to trigger scripts during an incident, which violates the automated incident response requirement.

833
Multi-Selecthard

A DevOps team is designing a solution to encrypt data at rest for an Amazon RDS for MySQL database. Which TWO actions should the team take? (Choose TWO.)

Select 2 answers
A.Enable encryption after creating the RDS instance by modifying the instance
B.Enable SSL/TLS for the RDS instance
C.Use AWS KMS to create a customer managed key and assign it to the RDS instance
D.Enable encryption at rest when creating the RDS DB instance
E.Store the database files in an encrypted S3 bucket
AnswersC, D

You can use AWS KMS to create a customer managed key and assign it to the RDS instance during creation to encrypt data at rest.

Why this answer

To encrypt data at rest for Amazon RDS for MySQL, encryption must be enabled when creating the DB instance (Option D) and a customer managed key from AWS KMS can be used (Option C). Option A is incorrect because you cannot enable encryption on an existing unencrypted RDS instance; it must be done at creation time. Option B is incorrect because SSL/TLS encrypts data in transit, not at rest.

Option E is incorrect because storing database files in an encrypted S3 bucket does not encrypt the RDS instance; RDS encryption is managed by AWS KMS and is enabled at the instance level.

834
MCQmedium

A DevOps engineer is using AWS CodeDeploy to deploy an application to an Auto Scaling group. The deployment fails with the error: 'The overall deployment failed because too many individual instances failed deployment'. The engineer checks the logs and finds that the application installation script exits with a non-zero exit code. What should the engineer do to troubleshoot?

A.Configure CloudWatch Logs to capture the script output
B.Increase the deployment's MinHealthyHosts percentage
C.Re-upload the application revision to S3
D.SSH into one of the failed instances and run the install script manually to identify the error
AnswerD

SSHing into a failed instance and manually running the install script is the most direct way to diagnose the failure, because you can reproduce the exact command and see the script's stderr, exit code, missing dependencies, permission errors, or incorrect path assumptions. CodeDeploy lifecycle scripts run under the instance's configured user environment, so executing the same script from the deployment archive directory (for example, /opt/codedeploy-agent/deployment-root/<deployment-id>/.../deployment-archive) exposes the root cause and lets you test a fix locally. This is the standard first step in troubleshooting a failed lifecycle hook.

Why this answer

The deployment failure is caused by the application installation script exiting with a non-zero exit code, which indicates a specific error in the script or its environment. SSHing into a failed instance and running the install script manually allows the engineer to see the exact error output, debug the script logic, and identify missing dependencies or configuration issues directly on the target host.

Exam trap

The trap here is that candidates may assume increasing MinHealthyHosts or re-uploading the revision will fix the issue, when in fact the problem is a script-level error that requires direct investigation on a failed instance.

How to eliminate wrong answers

Option A is wrong because CloudWatch Logs can capture script output only if the script is configured to write to a log file and the CloudWatch agent is installed and configured on the instances; it does not retroactively capture the error from a failed deployment. Option B is wrong because increasing MinHealthyHosts percentage would raise the threshold for healthy instances, making the deployment more strict and likely to fail faster, not help troubleshoot the script error. Option C is wrong because re-uploading the application revision to S3 does not address the root cause of the script failure; the revision is already present on the instances, and the error is in the execution, not in the upload.

835
Multi-Selecthard

A company uses AWS CodePipeline with a source stage from Amazon S3. The pipeline deploys a static website to an S3 bucket. The deployment must ensure that the website is always available and that rollbacks happen automatically if the deployment fails. Which TWO actions should the company take?

Select 2 answers
A.Use Amazon Route53 weighted routing to shift traffic
B.Use AWS CodeDeploy with an in-place deployment
C.Use a blue/green deployment strategy with two S3 buckets
D.Configure AWS CloudFormation stack with automatic rollback on failure
E.Enable S3 bucket versioning to keep multiple versions
AnswersC, D

A blue/green deployment strategy with two S3 buckets allows you to host both the current (blue) and new (green) versions of your application or static assets in separate buckets. You validate the green version in production, then switch routing (e.g., via Route 53 or CloudFront) from blue to green, ensuring zero downtime. If issues arise after the switch, changing the routing back to the blue bucket provides an immediate rollback.

Why this answer

A blue/green deployment strategy with two S3 buckets allows the company to maintain the current (blue) bucket serving the live website while deploying the new version to a separate (green) bucket. This ensures zero-downtime deployments and, if the deployment fails, traffic can simply remain pointed to the blue bucket, providing an automatic rollback without any manual intervention. Option D is correct because AWS CloudFormation can be configured with automatic rollback on failure, which will revert the stack to its last known good state if the deployment fails, ensuring the website remains available.

Exam trap

The trap here is that candidates often confuse S3 bucket versioning (Option E) with a deployment rollback strategy, but versioning only provides object-level version history and does not automate traffic switching or infrastructure rollback on failure.

836
Multi-Selectmedium

A company is using AWS CodeBuild to run builds for a Java application. The build takes a long time because it downloads Maven dependencies every time. The team wants to speed up the build by caching dependencies. Which TWO actions should be taken? (Choose 2)

Select 2 answers
A.Enable Amazon S3 caching in the CodeBuild project and specify an S3 bucket to store the cache.
B.Use CodeBuild's 'build cache' feature without specifying a bucket; it will automatically cache to a default location.
C.Set the cache type to 'Local' in the CodeBuild project configuration.
D.Mount an Amazon EFS file system to the build container and configure Maven to use it as a local repository.
E.Configure the buildspec file to save the Maven local repository (.m2) to the cache path.
AnswersA, E

Enabling Amazon S3 caching in the CodeBuild project configuration lets you specify an S3 bucket (and optional prefix) that CodeBuild uses to store and retrieve build artifacts such as the Maven local repository. When S3 caching is turned on, CodeBuild automatically saves the directories declared in the buildspec's cache/paths section to that bucket and restores them at the start of subsequent builds, eliminating repeated dependency downloads and reducing build time. This is the recommended, fully managed caching approach for Java/Maven projects.

Why this answer

CodeBuild supports Amazon S3 caching, which allows you to store build artifacts (such as Maven dependencies) in a specified S3 bucket. By enabling this feature, subsequent builds can download the cached dependencies from S3 instead of re-downloading them from the internet, significantly reducing build time. Option E is correct because the buildspec file must explicitly define the cache path (e.g., /root/.m2) to tell CodeBuild which directory to cache; without this, CodeBuild does not know what to save or restore.

Exam trap

The trap here is that candidates often assume CodeBuild has a built-in local cache that works automatically without configuration, but in reality, you must explicitly define the cache path in the buildspec and choose between S3 or local caching (local caching is only available for certain build environments and still requires the buildspec path).

837
Multi-Selecthard

Which TWO approaches can be used to automatically roll back a failed deployment in AWS CodeDeploy? (Choose two.)

Select 2 answers
A.Use a CloudWatch Events rule to trigger a rollback when a deployment fails
B.Attach an IAM policy to the CodeDeploy service role that allows rollback actions
C.Specify a rollback revision in the AppSpec file
D.Configure the deployment group to automatically roll back when a deployment fails
E.Configure the deployment group to automatically roll back when a CloudWatch alarm is triggered
AnswersD, E

Configuring the deployment group to automatically roll back when a deployment fails is a built-in CodeDeploy feature: you select this option in the deployment group's rollback configuration, and if the deployment fails (for example, due to a failed health check), CodeDeploy automatically redeploys the last successfully deployed revision. This is one of the two native automatic rollback triggers, and it requires no external services or custom code. It also logs the rollback as a new deployment event for auditability.

Why this answer

AWS CodeDeploy allows you to configure a deployment group to automatically roll back a deployment when it fails. This is a native feature that can be enabled in the deployment group settings, ensuring that if a deployment fails (e.g., due to health check failures or script errors), CodeDeploy automatically reverts to the last known good revision without manual intervention.

Exam trap

The trap here is that candidates often confuse CloudWatch Events rules with direct rollback triggers, but CloudWatch Events can only invoke actions like notifications or Lambda functions, not native CodeDeploy rollbacks, which require explicit configuration in the deployment group.

838
MCQeasy

A company has an Amazon RDS for MySQL database that stores sensitive data. The security team requires encryption at rest and in transit. Which combination of options meets these requirements?

A.Use AWS Certificate Manager to issue a certificate for the RDS instance
B.Place the RDS instance in a private subnet and use VPC peering
C.Enable encryption at rest on the RDS instance and enforce SSL connections
D.Use AWS KMS to encrypt the database before inserting data and decrypt on read
AnswerC

Enabling RDS encryption at rest encrypts the underlying storage, automated backups, snapshots, and read replicas using AWS KMS AES-256 encryption, satisfying the data-at-rest requirement. Enforcing SSL connections (for example, by setting rds.force_ssl=1 or requiring ssl-mode in the client) encrypts data between the application and the database, covering data in transit. Note that enabling encryption at rest on an existing unencrypted MySQL instance requires restoring from an encrypted snapshot rather than modifying the instance in place, but together these controls fully address the stated security need.

Why this answer

Encryption at rest for Amazon RDS is enabled by turning on RDS encryption when creating the instance. Encryption in transit is achieved by enforcing SSL/TLS connections for client connections to the database. Option C correctly combines both: enabling RDS encryption for at-rest security and enforcing SSL for in-transit security.

Option A (AWS Certificate Manager) provides certificates but does not directly encrypt the RDS instance. Option B (private subnet with VPC peering) addresses network isolation, not encryption. Option D (client-side encryption with KMS) encrypts data before insertion but does not use RDS encryption and is not a standard RDS feature.

839
Multi-Selectmedium

Which TWO actions can be taken to secure an Amazon S3 bucket that contains confidential data? (Choose TWO.)

Select 2 answers
A.Enable S3 Default Encryption.
B.Enable S3 Transfer Acceleration.
C.Enable S3 Cross-Region Replication.
D.Enable S3 Versioning.
E.Enable S3 Block Public Access.
AnswersA, E

S3 Default Encryption ensures that every object written to the bucket is automatically encrypted at rest, using either SSE-S3 (AES-256) or SSE-KMS (customer-managed KMS keys); SSE-C is not supported for default encryption. This protects the confidentiality of data at rest and helps satisfy compliance frameworks that mandate encryption. It is a direct security control for data confidentiality, but it does not control who can access the data.

Why this answer

Correct options: A and E. Option A: S3 Default Encryption ensures data is encrypted at rest automatically, a key security measure. Option E: S3 Block Public Access prevents public exposure of the bucket and its objects, a key security measure.

Option B (Transfer Acceleration) is for speed, not security. Option C (Cross-Region Replication) is for disaster recovery, not security. Option D (Versioning) helps with recovery from accidental deletions/overwrites, but does not directly secure data from unauthorized access.

840
MCQmedium

An organization uses AWS Systems Manager to manage a fleet of EC2 instances. They want to ensure that all instances have a specific software package installed. Which approach should they take?

A.Use OpsCenter to create an OpsItem for each instance.
B.Use Run Command to execute the installation on all instances.
C.Create a Patch Baseline that includes the package.
D.Create a State Manager association with a custom document that installs the package.
AnswerD

State Manager enforces configuration state.

Why this answer

State Manager associations can enforce desired configurations, such as installing software packages, on a schedule or continuously. Option B is wrong because Run Command is for one-time ad-hoc execution, not ongoing compliance. Option C is wrong because Patch Manager focuses on OS patches, not arbitrary software packages.

Option A is wrong because OpsCenter is for operational issues, not configuration management.

841
MCQeasy

A DevOps team is using AWS CloudFormation to manage a multi-tier application. They want to ensure that when an update to the stack causes a resource replacement, the replacement occurs only after the new resource is fully created and tested. Which CloudFormation feature should they use?

A.UpdatePolicy attribute with AutoScalingRollingUpdate
B.CreationPolicy attribute
C.DeletionPolicy attribute set to Retain
D.DependsOn attribute to specify creation order
AnswerB

Incorrect. The `CreationPolicy` attribute does not have a `CreateBeforeDestroy` property. It is used to wait for a signal from the resource after creation, not to control the order of replacement during updates.

Why this answer

The CreationPolicy attribute can be added to a resource to ensure that CloudFormation waits for a specified number of success signals before considering the resource created. When a stack update causes a resource replacement, CloudFormation creates the new resource, waits for the creation signals (if a CreationPolicy is defined), and only then deletes the old resource. This ensures the new resource is fully operational and tested before replacement.

The other options are incorrect: UpdatePolicy with AutoScalingRollingUpdate is for updating instances in an Auto Scaling group without full replacement; DeletionPolicy Retain keeps the old resource but does not manage creation; DependsOn controls creation order but does not wait for testing signals.

Exam trap

Candidates often confuse the UpdatePolicy (used for rolling updates in Auto Scaling) with CreationPolicy (used to wait for resource creation signals). The trap is to think that only Auto Scaling resources can be tested during replacement; many resources support CreationPolicy for signal-based testing during replacement.

How to eliminate wrong answers

Option A is wrong because `UpdatePolicy` with `AutoScalingRollingUpdate` is specific to Auto Scaling groups and controls how instances are updated during rolling updates, not how resource replacements are sequenced for arbitrary resources. Option C is wrong because `DeletionPolicy` set to `Retain` only preserves a resource when the stack is deleted, not during an update replacement; it does not control creation order or testing. Option D is wrong because `DependsOn` only specifies the creation order of resources during initial stack creation, not the replacement behavior during updates; it cannot enforce that a new resource is created and tested before the old one is removed.

842
MCQhard

A DevOps engineer is tasked with centralizing logs from multiple AWS accounts into a single Amazon OpenSearch Service domain. The engineer sets up Amazon Kinesis Data Firehose to deliver logs from each account to the OpenSearch domain. However, some accounts show failed deliveries in the Firehose console. Which configuration is MOST likely causing the failures?

A.The IAM role assumed by Firehose in each account does not have permissions to write to the cross-account OpenSearch domain
B.The source accounts do not have a CloudWatch Logs subscription filter to send logs to Firehose
C.The Kinesis Data Streams used as the Firehose source is not encrypted
D.The OpenSearch domain's access policy does not allow access from the S3 bucket used by Firehose
AnswerA

Firehose needs an IAM role with sts:AssumeRole and es:HttpPut permissions for the destination OpenSearch domain.

Why this answer

The most likely cause of failed deliveries is that the IAM role assumed by Kinesis Data Firehose in each source account lacks the necessary permissions to write to the cross-account Amazon OpenSearch Service domain. Firehose uses a service-linked or custom IAM role to perform actions such as `es:ESHttpPut` and `es:ESHttpPost` against the OpenSearch domain endpoint. Without explicit cross-account trust and resource-based policy allowing the Firehose role's ARN, the delivery will fail with an authorization error.

Exam trap

The trap here is that candidates often assume the failure is due to missing CloudWatch subscription filters or S3 bucket permissions, but the real issue is the missing cross-account IAM trust between the Firehose role and the OpenSearch domain's access policy.

How to eliminate wrong answers

Option B is wrong because CloudWatch Logs subscription filters are used to stream log data to Firehose, but the question states that logs are being delivered from multiple accounts; the failure is at the Firehose-to-OpenSearch stage, not at the ingestion stage. Option C is wrong because Kinesis Data Streams encryption (whether server-side or client-side) does not affect Firehose's ability to write to OpenSearch; Firehose can read encrypted streams as long as it has the proper KMS permissions. Option D is wrong because Firehose writes directly to the OpenSearch domain via HTTP/HTTPS, not through an S3 bucket; the OpenSearch domain's access policy must grant access to the Firehose IAM role or the source account's principal, not to an S3 bucket.

843
MCQmedium

Refer to the exhibit. A security engineer finds this CloudTrail log entry. What is the most likely security concern?

A.The bucket is now publicly accessible
B.The bucket policy grants the root user full access
C.The root user performed an action that should have been done by an IAM user
D.The bucket policy allows only authenticated users to read objects
AnswerA

The CloudTrail event shows an s3:PutBucketPolicy call containing 'Principal': '*' and 'Effect': 'Allow' for 's3:GetObject'. That statement explicitly permits anonymous, unauthenticated access to all objects in the bucket. Since no condition restricts the requester and S3 object ownership permits the bucket owner to apply the policy, the bucket is now publicly accessible and every object is readable by anyone with the URL.

Why this answer

The CloudTrail log entry shows a PutBucketPolicy action that sets a bucket policy with principal '*', granting public read access to all objects in the bucket. This is a security concern because the bucket becomes publicly accessible, allowing anyone on the internet to read objects. Option A is correct because the bucket policy makes the bucket publicly accessible.

Option B is incorrect because the bucket policy does not grant the root user full access; it grants public access. Option C is incorrect because the action is performed by an IAM user (the user field shows 'arn:aws:iam::123456789012:user/admin'), not the root user. Option D is incorrect because the policy allows all principals (public) to read objects, not just authenticated users.

844
Multi-Selecthard

A company is migrating a monolithic application to a microservices architecture on AWS. To improve resilience, which THREE design patterns should be implemented? (Select THREE.)

Select 3 answers
A.Synchronous communication between services to ensure consistency
B.Single shared database to maintain data consistency
C.Retry with exponential backoff for transient failures
D.Bulkhead pattern to isolate critical services from non-critical ones
E.Circuit breaker pattern to stop calls to a failing service
AnswersC, D, E

Retry with exponential backoff is a core resilience pattern that reattempts an operation after an exponentially increasing delay, typically with jitter to avoid synchronized retries, which prevents a thundering herd. It specifically targets transient failures, such as network timeouts, database connection drops, or throttling (e.g., API Gateway 429s or DynamoDB throttling), where the operation may succeed on a subsequent attempt if the original failure was short-lived. This pattern preserves system stability by giving the dependency time to recover and reducing continuous load, and it is widely supported in AWS SDKs and infrastructure.

Why this answer

Implementing retry with exponential backoff allows services to handle transient failures (e.g., network timeouts, throttling) by automatically retrying operations after increasing delays, reducing load on recovering systems. This pattern is essential for microservices on AWS, where services like DynamoDB or Lambda may throttle requests, and exponential backoff (e.g., using jitter as per AWS SDK defaults) prevents cascading failures.

Exam trap

The trap here is that candidates confuse synchronous communication (Option A) with resilience, but in microservices, synchronous calls increase failure propagation, while asynchronous patterns and the three selected patterns (retry, circuit breaker, bulkhead) are the correct resilience mechanisms.

845
Multi-Selecthard

A company uses AWS Organizations to manage multiple accounts. The DevOps team needs to monitor for any IAM user creation across all accounts in the organization. Which THREE steps should be taken to implement this centralized monitoring?

Select 3 answers
A.Create a CloudWatch Logs metric filter on the organization's CloudTrail log group for 'CreateUser' events.
B.Enable CloudTrail in the management account with an organization trail that applies to all accounts.
C.Configure an S3 bucket to receive CloudTrail logs from all accounts and enable S3 event notifications for object creation.
D.Use AWS Config rules to detect IAM user creation across accounts.
E.Set a CloudWatch alarm on the metric to send notifications via SNS.
AnswersA, B, E

Metric filters in CloudWatch Logs can parse CloudTrail logs for specific event names, counting occurrences of CreateUser API calls. Since the organization trail delivers logs to a central log group in the management account, a single metric filter can monitor IAM user creation across all member accounts. This provides a real-time, event-driven signal to trigger a CloudWatch alarm, rather than relying on periodic scans or resource configuration evaluations.

Why this answer

Options A, B, and E are correct. Option B: Enabling CloudTrail in the management account with an organization trail captures all API activity across accounts. Option A: Creating a CloudWatch Logs metric filter on the organization's CloudTrail log group for 'CreateUser' events captures the specific event.

Option E: Setting a CloudWatch alarm on the metric sends notifications via SNS. Option C is wrong because configuring an S3 bucket with event notifications does not directly enable centralized monitoring and alerting for IAM user creation. Option D is wrong because AWS Config rules are used for resource configuration compliance, not for real-time API call monitoring like IAM user creation.

846
MCQhard

A company is using AWS CodeDeploy with a blue/green deployment strategy for an Amazon ECS service. After a deployment, the new task set fails health checks, and CodeDeploy automatically rolls back to the original task set. However, the rollback fails because the original task set's desired count is set to 0. What is the most likely cause?

A.The original task set's desired count was set to 0 during the blue/green deployment and the rollback is unable to restore it because the original task definition is no longer available.
B.The original task set's health checks are failing.
C.The original task set's CloudFormation stack was deleted during the deployment.
D.The original task set was deregistered from the target group.
AnswerA

In a blue/green ECS deployment, CodeDeploy shifts traffic to the replacement task set and sets the original task set's desired count to zero. When a rollback triggers, CodeDeploy attempts to restore that original task set, but if its task definition revision was deregistered or replaced, ECS cannot recreate the task set. The missing task definition makes it impossible to satisfy the service's desired count, leaving the service at zero. This is why keeping the original task definition revision available is critical for successful rollbacks.

Why this answer

During a blue/green deployment on ECS, CodeDeploy sets the original (blue) task set's desired count to 0 after the new (green) task set is created and begins serving traffic. If the green task set fails health checks and triggers an automatic rollback, CodeDeploy attempts to restore the original task set's desired count to its previous value. However, if the original task definition has been deregistered or deleted (e.g., due to lifecycle policies or manual cleanup), the rollback cannot scale the original task set back up, causing the rollback to fail.

Exam trap

The trap here is that candidates assume the rollback fails because the original task set is unhealthy or deregistered from the target group, when in reality the root cause is the deletion of the original task definition, which CodeDeploy needs to recreate the task set during rollback.

How to eliminate wrong answers

Option B is wrong because the original task set's health checks are irrelevant — the original task set is not running (desired count is 0) and thus cannot fail health checks; the rollback failure is due to the inability to restore the task set, not health check failures. Option C is wrong because CloudFormation stacks are not involved in the CodeDeploy blue/green deployment process for ECS; the deployment is managed by CodeDeploy and ECS services, not CloudFormation stack deletion. Option D is wrong because deregistering the original task set from the target group would not prevent the rollback from scaling it up — the rollback fails because the original task definition is missing, not because of target group registration.

847
MCQeasy

A team wants to automate the creation of a CI/CD pipeline using a JSON/YAML file that defines source, build, and deploy stages. Which AWS service should they use?

A.AWS CloudFormation
B.AWS Elastic Beanstalk
C.AWS CodePipeline
D.AWS CodeDeploy
AnswerA

AWS CloudFormation is the correct choice because it allows the CI/CD pipeline to be defined declaratively as infrastructure as code. A CloudFormation template can specify the source stage, build actions, deployment providers (including CodeDeploy), IAM roles, S3 buckets, and event triggers, then create or update the pipeline in a repeatable and version-controlled manner. This makes it a true automation mechanism for pipeline creation, unlike the other services listed, which either are the pipeline itself or operate within it.

Why this answer

AWS CloudFormation is the correct service because it allows you to define infrastructure as code (IaC) using JSON or YAML templates, which can include the creation of a CI/CD pipeline by defining resources like AWS CodePipeline, CodeBuild, and CodeDeploy. This enables full automation of the pipeline's source, build, and deploy stages through a declarative template, rather than manually configuring each service. The question specifically asks for automating the creation of the pipeline itself using a JSON/YAML file, which is exactly what CloudFormation does.

Exam trap

The trap here is that candidates often confuse the service that defines the pipeline (CloudFormation) with the service that runs the pipeline (CodePipeline), leading them to select CodePipeline because it is directly associated with CI/CD, but the question explicitly asks for the service that uses a JSON/YAML file to automate the creation of the pipeline, which is CloudFormation.

How to eliminate wrong answers

Option B is wrong because AWS Elastic Beanstalk is a PaaS service that automates application deployment and scaling, but it does not allow you to define a CI/CD pipeline using a JSON/YAML file; it uses a configuration file (e.g., .ebextensions) for environment settings, not for pipeline stages. Option C is wrong because AWS CodePipeline is a CI/CD service that orchestrates source, build, and deploy stages, but it is the pipeline itself, not a tool to create the pipeline via a JSON/YAML file; while CodePipeline can be defined in a CloudFormation template, the question asks for the service to automate the creation of the pipeline, not the pipeline service itself. Option D is wrong because AWS CodeDeploy is a deployment service that automates code deployments to compute services like EC2 or Lambda, but it only handles the deploy stage and cannot define the entire pipeline (source, build, deploy) using a JSON/YAML file.

848
MCQeasy

A company runs a web application on an Auto Scaling group of EC2 instances. The operations team uses CloudWatch alarms to monitor the application. They have set up a CPUUtilization alarm that triggers when the average CPU exceeds 70% for 5 minutes. The alarm triggers a scaling policy to add instances. Recently, the team noticed that the alarm frequently triggers during the day, but the application performance is acceptable. They suspect the alarm is too sensitive and want to reduce the number of false alarms. The team wants to keep the alarm responsive to real CPU spikes but avoid triggering on short bursts. What should the team change in the alarm configuration?

A.Create a composite alarm that combines CPUUtilization with MemoryUtilization.
B.Reduce the metric period to 1 minute and keep evaluation periods at 1.
C.Increase the number of evaluation periods to 3, so the alarm triggers only if CPU is high for 3 consecutive periods.
D.Lower the threshold to 60% to catch more CPU spikes.
AnswerC

Increasing evaluation periods to 3 (with the same period of e.g., 5 minutes) means the alarm triggers only if CPU exceeds 70% for 3 consecutive periods (15 minutes). This filters out short bursts and reduces false alarms while still catching sustained high CPU.

Why this answer

The alarm is triggering too frequently due to short CPU bursts. The goal is to reduce false alarms while remaining responsive to sustained high CPU. Increasing the number of evaluation periods requires the CPU to exceed the threshold for multiple consecutive periods before triggering, filtering out transient spikes.

Thus, option C is correct. Option A (composite alarm) would add complexity but does not address the sensitivity to short bursts. Option B (reducing period to 1 minute) would make the alarm more sensitive, increasing false alarms.

Option D (lowering threshold to 60%) would also increase sensitivity, making false alarms worse.

849
MCQmedium

A DevOps engineer is creating a CloudFormation template to deploy a VPC with public and private subnets. The template uses the 'AWS::EC2::VPC' resource and two 'AWS::EC2::Subnet' resources. The engineer wants to ensure that the subnets are created in different Availability Zones. What is the best approach?

A.Use Fn::GetAZs function with Fn::Select to pick different AZs from the region's AZ list.
B.Use the CidrBlock property to define different AZs.
C.Use Fn::GetAZs function with a count of 2 to automatically assign different AZs.
D.Hardcode the Availability Zone names in the template.
AnswerA

Fn::GetAZs returns a list of all Availability Zones available in the current region, and Fn::Select chooses an element via its zero-based index. By combining them, you can assign the first AZ to one subnet (Fn::Select [0, Fn::GetAZs ""]) and the second AZ to another (Fn::Select [1, Fn::GetAZs ""]), ensuring two distinct AZs without hardcoding region-specific names. This approach remains valid even as the region's AZ list changes and keeps the template portable across regions.

Why this answer

Fn::GetAZs returns a list of all Availability Zones in the region, and Fn::Select allows you to pick specific indices from that list, ensuring each subnet is assigned a different AZ. This approach is dynamic and region-agnostic, so the template works across regions without hardcoding AZ names. It also avoids the risk of using the same AZ for both subnets, which would violate the requirement for high availability.

Exam trap

The trap here is that candidates confuse the CidrBlock property with AZ assignment, or assume Fn::GetAZs can directly return multiple AZs without using Fn::Select, leading them to pick option B or C.

How to eliminate wrong answers

Option B is wrong because the CidrBlock property defines the IP address range for the subnet, not the Availability Zone; AZ assignment is controlled by the AvailabilityZone property. Option C is wrong because Fn::GetAZs does not accept a count parameter; it returns a list of all AZs, and you must use Fn::Select or Fn::Split to pick individual AZs. Option D is wrong because hardcoding AZ names makes the template region-specific and brittle; if the template is deployed in a region with different AZ names, it will fail, and it also prevents the template from adapting to regions with fewer AZs.

850
MCQhard

An organization uses AWS Key Management Service (KMS) with customer-managed keys. The security policy requires automatic key rotation every year. A DevOps engineer notices that the key material is not rotating as expected. What is the most likely cause?

A.The key was created by importing key material; automatic rotation is not supported for imported keys.
B.The key must be re-imported annually to enable rotation.
C.The key is not enabled for rotation due to a billing limit.
D.The key is in a 'Pending Deletion' state and cannot be rotated.
AnswerA

An AWS KMS customer master key with imported key material (Origin: EXTERNAL) cannot have automatic key rotation enabled, because rotation relies on the key material being generated and managed within AWS KMS. The import mechanism bypasses KMS's managed backing keys, so the service cannot automatically replace the backing key. To rotate such a key, you must manually create a new CMK or import new key material into the existing CMK.

Why this answer

Automatic key rotation is not supported for imported key material. Option B is wrong because KMS does not charge extra for automatic rotation. Option C is wrong because KMS does not require re-importing for rotation; it's simply not available.

Option D is wrong because the key state does not prevent rotation.

851
MCQmedium

A company stores sensitive customer data in an S3 bucket. The security team requires that all data be encrypted at rest using customer-managed KMS keys. Additionally, any attempt to upload an unencrypted object must be denied. Which S3 bucket policy should be used?

A.Deny s3:PutObject unless the request includes s3:x-amz-server-side-encryption: true
B.Allow s3:PutObject with condition s3:x-amz-server-side-encryption: AES256
C.Allow s3:PutObject with condition kms:EncryptionContext: department:finance
D.Deny s3:PutObject unless the request includes s3:x-amz-server-side-encryption: aws:kms
AnswerD

This explicit Deny is the correct approach because it denies any PutObject that does not include the x-amz-server-side-encryption header with the value 'aws:kms'. The value 'aws:kms' is the algorithm identifier for SSE-KMS, ensuring all uploaded objects are encrypted with a KMS-managed key. Because it is an explicit deny, even if another policy allows an unencrypted upload, this deny overrides it. This is the standard pattern for enforcing KMS encryption across an S3 bucket.

Why this answer

The condition 's3:x-amz-server-side-encryption':'aws:kms' in a Deny statement ensures that only requests with SSE-KMS encryption are allowed, blocking unencrypted uploads or uploads with other encryption types. Option A is wrong because 'true' is not a valid encryption type; the correct value is 'aws:kms'. Option B is wrong because it allows SSE-S3 (AES256), not KMS encryption.

Option C is wrong because it checks a KMS encryption context rather than the encryption header, and it does not deny unencrypted uploads.

852
MCQhard

A DevOps engineer is troubleshooting a CodePipeline that has a Build stage using AWS CodeBuild. The build logs show 'Error: No such file or directory' for a file that is present in the source repository. What is the most likely cause?

A.The buildspec.yaml specifies an incorrect path for the file relative to the source root.
B.The build commands are not executed because the pre_build phase failed.
C.The artifact definition in the buildspec.yaml is incorrect.
D.The environment variables in CodeBuild are not set correctly.
AnswerA

In CodeBuild, each build phase executes from the source root, so any command that references a file—such as a build script, configuration file, or dependency manifest—must specify a path relative to that root (or use $CODEBUILD_SRC_DIR). If buildspec.yaml points to a file using an incorrect relative path (e.g., forgetting a subdirectory, misspelling a folder, or assuming a different working directory), the shell returns a 'No such file or directory' error. Verify the actual repository layout against every file path used in the install, pre_build, build, and post_build commands.

Why this answer

The error 'No such file or directory' indicates that the build process is attempting to access a file at a path that does not exist relative to the source root. In AWS CodeBuild, the build runs in a temporary directory that contains the source code, and all paths in the buildspec.yaml are relative to the source root by default. If the buildspec.yaml specifies an incorrect relative path (e.g., using an absolute path or a wrong subdirectory), CodeBuild will fail to locate the file, even though it exists in the repository.

Exam trap

The trap here is that candidates often confuse file path errors with environment variable misconfiguration or artifact issues, but the root cause is almost always a path mismatch in the buildspec.yaml relative to the source root.

How to eliminate wrong answers

Option B is wrong because if the pre_build phase failed, the build phase would not execute at all, and the error message would typically indicate a phase failure, not a 'No such file or directory' error for a specific file. Option C is wrong because an incorrect artifact definition would cause issues during the artifact packaging or upload phase, not during the build execution when accessing source files. Option D is wrong because environment variables in CodeBuild do not affect file path resolution; they are used for passing configuration values, not for locating files in the source directory.

853
MCQhard

A company uses Amazon RDS for MySQL with Multi-AZ deployment. The primary DB instance fails, and automatic failover does not occur within the expected 1-2 minutes. The DevOps team needs to quickly restore database availability. What should the team do first?

A.Restore the latest automated snapshot to a new DB instance.
B.Modify the DB instance to change the Multi-AZ setting to enable automatic failover.
C.Connect to the standby instance directly and promote it to primary.
D.Reboot the DB instance with failover selected.
AnswerD

Rebooting the DB instance with the 'Reboot with failover' option selected forces a synchronous failover to the standby instance, typically completing in 60-120 seconds. This is the fastest method to manually initiate a failover while preserving existing data, as the standby is already in sync and becomes the new primary.

Why this answer

When automatic failover does not occur within the expected 1-2 minutes, the fastest way to manually trigger a failover is to reboot the DB instance with the 'Reboot with Failover' option selected. This forces the RDS service to promote the standby replica to the new primary, restoring database availability without waiting for the automated health check to complete. Option D is correct because it directly initiates the failover process, leveraging the existing Multi-AZ setup.

Exam trap

The trap here is that candidates assume they can directly access or promote the standby instance (Option C), but RDS does not expose the standby as a connectable endpoint, and the only manual failover mechanism is the reboot with failover option.

How to eliminate wrong answers

Option A is wrong because restoring from the latest automated snapshot to a new DB instance is a time-consuming process (can take minutes to hours depending on size) and does not utilize the existing standby replica, which is already synchronized and ready to take over. Option B is wrong because modifying the Multi-AZ setting to 'enable automatic failover' is not a valid action; Multi-AZ is already enabled and the setting cannot be toggled to 'enable' failover—failover is inherent to Multi-AZ and the issue is that the automatic health check did not trigger it. Option C is wrong because you cannot directly connect to the standby instance in Amazon RDS Multi-AZ; the standby is not accessible as a standalone database endpoint and there is no 'promote' operation available to the user—RDS manages the standby entirely.

854
MCQhard

A company uses Amazon ECS with Fargate for containerized applications. The DevOps team notices that some tasks are failing with 'OutOfMemoryError' but the CloudWatch metric 'MemoryUtilization' for the service shows values well below the task memory limit. What is the most likely cause of this discrepancy?

A.The container's memory usage is hitting the kernel's memory cgroup limit before the Docker-reported usage reaches the task memory limit.
B.The CloudWatch metric 'MemoryUtilization' is aggregated across all tasks in the service, so individual task spikes are averaged out.
C.The task definition has a memory reservation but no hard limit, causing ECS to overcommit memory.
D.The container is using swap space, which is not included in the MemoryUtilization metric.
AnswerA

The OOM killer can be triggered by the kernel's memory cgroup limit, which may be set lower than the task memory limit, or by the container exceeding the soft limit, causing the metric to not reflect the actual limit breach.

Why this answer

The MemoryUtilization metric reported by CloudWatch for ECS on Fargate is based on the Docker-reported memory usage, but the Linux kernel's out-of-memory (OOM) killer terminates the container when it exceeds the hard memory limit defined at the container level in the task definition. This can happen even if the task-level metric appears below the limit, as the metric may smooth out spikes or not reflect the container's actual memory cgroup limit. Option B is wrong because averaging across tasks does not cause a discrepancy for individual tasks; the metric is per-task.

Option C is wrong because in Fargate, the task definition specifies both memory reservation (soft limit) and memory limit (hard limit), and the issue is with the hard limit. Option D is wrong because Fargate does not support swap space.

855
MCQeasy

A company wants to use AWS OpsWorks for configuration management of their EC2 instances. They need to ensure that the instances are automatically configured with the latest security patches upon boot. Which OpsWorks feature should they use?

A.Create a custom Chef recipe that installs security patches and assign it to the setup lifecycle event.
B.Configure the instances to run a user data script that updates packages.
C.Use AWS Systems Manager Patch Manager with an OpsWorks lifecycle event.
D.Use a CloudFormation template to apply patches during stack creation.
AnswerA

Custom Chef recipes are the native configuration-management mechanism in AWS OpsWorks. Assigning a recipe that invokes the platform package manager (e.g., `apt-get update` and `apt-get upgrade -y` or `yum update -y`) to the setup lifecycle event ensures it runs on every instance immediately after boot, before any application deployment. The setup event runs only once at instance launch, making it the correct hook for initial patch application, and OpsWorks propagates any recipe changes when instances are updated or started.

Why this answer

AWS OpsWorks uses Chef recipes to manage instance configuration. By creating a custom Chef recipe that installs the latest security patches and assigning it to the 'setup' lifecycle event, the recipe runs automatically on every new instance boot, ensuring patches are applied before the instance enters service. This is the native OpsWorks mechanism for configuration management during instance provisioning.

Exam trap

The trap here is that candidates may confuse OpsWorks's native Chef lifecycle events with external tools like Systems Manager or user data scripts, failing to recognize that OpsWorks is designed to use Chef recipes for configuration management, not external patch management services.

How to eliminate wrong answers

Option B is wrong because user data scripts run at boot but are not integrated with OpsWorks lifecycle events, so they cannot leverage OpsWorks's configuration management workflow or be managed centrally via Chef. Option C is wrong because AWS Systems Manager Patch Manager is a separate service that does not integrate directly with OpsWorks lifecycle events; OpsWorks does not have a built-in event hook for Patch Manager. Option D is wrong because CloudFormation templates are used for infrastructure provisioning, not for ongoing configuration management within OpsWorks; applying patches during stack creation does not ensure automatic patching on subsequent boots.

856
MCQeasy

An application running on Amazon ECS experiences intermittent failures. The DevOps engineer wants to capture the application's standard output and error logs and send them to CloudWatch Logs. What is the simplest way to achieve this?

A.Install the CloudWatch Agent in each container.
B.Configure AWS CloudTrail to capture logs.
C.Use the awslogs log driver in the task definition.
D.Write logs to a file and use an S3 bucket with event notifications.
AnswerC

The `awslogs` log driver, configured under the `logConfiguration` element in the ECS task definition, makes Docker send the container's `stdout` and `stderr` directly to a specified CloudWatch Logs group and stream. The ECS agent automatically creates log streams, and you can set `awslogs-group`, `awslogs-region`, and `awslogs-stream-prefix`; the task execution role must have `logs:CreateLogStream` and `logs:PutLogEvents` permissions. This approach requires no changes to the application image, works on both Fargate and EC2 launch types, and provides near-real-time access to logs through the CloudWatch console, CLI, or APIs. It is the native, recommended method for centralizing ECS container logs.

Why this answer

The awslogs log driver is the simplest native integration between Amazon ECS and CloudWatch Logs. By specifying the log driver in the task definition, the ECS container agent automatically captures stdout and stderr from the container and streams them to CloudWatch Logs without any additional agents or custom code.

Exam trap

The trap here is that candidates may overcomplicate the solution by choosing the CloudWatch Agent (Option A) because they assume an agent is needed, but the awslogs log driver is the built-in, simpler mechanism for ECS tasks.

How to eliminate wrong answers

Option A is wrong because installing the CloudWatch Agent inside each container adds unnecessary complexity and overhead; the awslogs log driver handles log forwarding at the container runtime level, making an in-container agent redundant. Option B is wrong because AWS CloudTrail captures API activity and management events, not application stdout/stderr logs, so it cannot fulfill the requirement to capture application output. Option D is wrong because writing logs to a file and using S3 event notifications introduces latency, extra components (S3 bucket, notifications), and does not provide real-time log streaming to CloudWatch Logs; the awslogs driver is far simpler and more direct.

857
Multi-Selectmedium

A company is deploying a new microservice on AWS Lambda. The DevOps team needs to monitor the function for errors and performance issues. Which TWO steps should the team take to set up effective monitoring?

Select 2 answers
A.Enable VPC Flow Logs to monitor network traffic to the function
B.Enable AWS Config rules to evaluate the function configuration
C.Enable active tracing with AWS X-Ray to trace requests through the function
D.Enable CloudWatch Logs for the Lambda function to capture application logs
E.Install the CloudWatch Agent on the Lambda execution environment
AnswersC, D

Enabling active tracing with AWS X-Ray gives you end-to-end visibility into requests as they pass through the Lambda function and any downstream AWS services or HTTP APIs. X-Ray automatically records a trace segment for each invocation, captures timing, errors, and subsegments for calls made with the AWS SDK, and supports sampling to control cost. It also propagates trace IDs across services, enabling you to follow a single user request through the entire distributed application.

Why this answer

AWS X-Ray provides end-to-end tracing for requests, allowing you to identify performance bottlenecks and errors in Lambda functions. Option D is correct because Lambda automatically sends logs to CloudWatch Logs, which capture application output, errors, and custom logging. Option A is incorrect: VPC Flow Logs monitor network traffic at the VPC level, not Lambda function internals.

Option B is incorrect: AWS Config evaluates resource configurations for compliance, not for function monitoring. Option E is incorrect: The CloudWatch Agent is for EC2 or on-premises servers; Lambda already integrates with CloudWatch Logs natively.

858
MCQmedium

Refer to the exhibit. A DevOps engineer set up a CloudWatch alarm for a Lambda function. The alarm fires when the error count metric exceeds 10 in 5 minutes. The engineer receives an alarm notification, but when checking the Lambda logs, only 3 errors are found in that 5-minute window. What is the MOST likely reason for the discrepancy?

A.The metric filter is not processing logs in real time, causing a delay.
B.The metric filter is counting errors from other log groups or sources that use the same metric name.
C.The metric filter pattern is incorrect and is matching non-error entries.
D.The Lambda function is generating more errors than shown in the logs.
AnswerB

When multiple log groups or sources publish to the same metric name and namespace, CloudWatch automatically sums all values into that single metric. The alarm then evaluates the aggregated count across all sources, not just the one log group being inspected in the console. In this scenario, other log groups or a Lambda custom metric with the same name are contributing 500-counts, so the alarm correctly reflects a combined total that is higher than the count visible in one individual log group.

Why this answer

The metric filter might be capturing errors from other log groups that share the same metric name (ErrorCount). If multiple Lambda functions or other services publish to the same metric, the alarm could be summing across all of them. Option A is wrong because CloudWatch Logs metric filters are near real-time.

Option C is wrong because Lambda errors are counted correctly. Option D is wrong because the metric filter is correctly defined.

859
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.

860
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.

861
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.

862
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.

863
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.

864
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.

865
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.

866
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.

867
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.

868
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.

869
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.

870
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.

871
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.

872
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.

873
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.

874
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.

875
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.

876
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.

877
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.

878
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.

879
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.

880
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.

881
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.

882
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.

883
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.

884
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.

885
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.

886
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.

887
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.

888
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.

889
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.

890
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.

891
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.

892
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.

893
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.

894
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.

895
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.

896
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.

897
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.

898
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.

899
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.

900
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.

Page 11

Page 12 of 15

Page 13