Question 310

An existing EC2 instance should react to changes in its CloudFormation initialization metadata. What mechanism can watch that metadata?

  1. Run cfn-init only once during initial launch
  2. Run cfn-signal repeatedly without a metadata hook
  3. cfn-hup with a configured hook
  4. Poll only EC2 instance health status

Explanation

Correct Answer

C:

The daemon detects metadata changes and can invoke configuration helpers to apply the revised state.

Incorrect Answers

A:

One invocation does not establish a watcher for later initialization metadata changes.

B:

Signals report initialization outcomes rather than detect and apply revised metadata.

D:

Infrastructure status checks do not compare CloudFormation initialization metadata revisions.

Question 311

Deleting a CloudFormation stack must leave its audit S3 bucket intact. Which resource attribute addresses that deletion path?

  1. Use UpdateReplacePolicy: Retain as the only stack-deletion control
  2. Use a stack policy denying Update:Delete as the only protection
  3. Set an Output containing the bucket ARN
  4. DeletionPolicy: Retain

Explanation

Correct Answer

D:

The bucket is preserved when CloudFormation removes the stack resource; continued storage and access management remain the owner's responsibility.

Incorrect Answers

A:

That attribute governs old physical resources during replacement, not the ordinary DeleteStack removal path.

B:

Stack policies control update behavior and do not replace DeletionPolicy for stack deletion.

C:

An output exposes an identifier without changing what DeleteStack does to the bucket.

Question 312

A deployment hook might run again after an interrupted deployment. What implementation property prevents duplicate destructive changes?

  1. Idempotent operations that detect the intended state
  2. An unconditional database reset
  3. A unique log message on every run
  4. A longer script file

Explanation

Correct Answer

A:

A rerun converges safely instead of blindly repeating actions such as duplicate database inserts.

Incorrect Answers

B:

Repeated resets can destroy data rather than safely resume deployment.

C:

Different logging does not prevent repeated side effects.

D:

Script size does not determine whether reruns are safe.

Question 313

A Lambda event-source mapping for a standard SQS queue uses BatchSize 1 and no batching window. To reduce per-message invocation overhead, operators want batches of up to 100 records and permit a configurable collection window. Payload and execution limits are acceptable. Which TWO mapping changes fit? Choose TWO.

  1. Configure a supported nonzero MaximumBatchingWindowInSeconds
  2. Set BatchSize to 100
  3. Increase only reserved concurrency
  4. Increase only the function execution timeout
  5. Set the queue visibility timeout to zero

Explanation

Correct Answers

A:

A batching window permits collecting records before invocation. For a standard SQS batch size above ten, configure the required nonzero window; batches can still be smaller because of available data or payload limits.

B:

The batch size sets the maximum number of records supplied in an invocation. A ceiling of one cannot deliver a 100-record batch regardless of available messages.

Incorrect Answers

C:

Concurrency limits govern simultaneous executions rather than how many records the mapping assembles for one invocation.

D:

The execution timeout bounds handler runtime after invocation. It does not set the poller collection window or record-count ceiling.

E:

Zero visibility can expose active messages for immediate redelivery and does not configure the requested batch assembly.

Question 314

An isolated build needs only S3 artifacts, ECR images, and CloudWatch Logs. Internet access is prohibited. What approach fits?

  1. Add an internet gateway and public route
  2. Enable privileged mode only
  3. Create the required VPC endpoints and endpoint permissions
  4. Disable artifact encryption

Explanation

Correct Answer

C:

Private service paths can support these dependencies without general internet egress; ECR image layers also require S3 access.

Incorrect Answers

A:

That design neither satisfies the no-internet policy nor supplies CodeBuild public addresses.

B:

Container privileges affect build capabilities, not connectivity to AWS service endpoints.

D:

Removing encryption cannot establish private network access.

Question 315

An Auto Scaling target-tracking policy counts fresh instances at normal utilization before their initialization period finishes. Capacity decisions oscillate, and the ALB must also withhold traffic until readiness succeeds. Which configuration should be reviewed?

  1. Increase the scaling cooldown and make every readiness check succeed
  2. Correct warmup and readiness or health-check grace settings
  3. Increase target deregistration delay only
  4. Disable replacement for every unhealthy instance

Explanation

Correct Answer

B:

Scaling evaluation and routing should account for initialization rather than treating warming nodes as fully effective capacity.

Incorrect Answers

A:

Suppressing feedback does not ensure new targets can actually serve requests.

C:

Draining old targets does not validate the initialization state of newly launched ones.

D:

That hides startup problems and also prevents legitimate later recovery.

Question 316

A test script prints FAILED but exits zero. CodeBuild reports success. What change makes failures block deployment?

  1. Increase test report retention
  2. Return a nonzero process exit status when assertions fail
  3. Add an SNS notification only
  4. Change the log text to uppercase

Explanation

Correct Answer

B:

Build phases use command results, not arbitrary printed words, to determine failure.

Incorrect Answers

A:

Keeping reports longer does not change the build result.

C:

A notification informs reviewers but does not make the test action fail.

D:

Log capitalization does not alter the command's success status.

Question 317

A business metric stops publishing entirely. Why is treating absent data as a numeric zero potentially misleading?

  1. Assume a missing datapoint is evidence that measured activity is exactly zero
  2. Missing telemetry can mean collector failure rather than no business activity
  3. Increase the graph width and infer zero from the empty interval
  4. Set all missing data to healthy without monitoring publisher health

Explanation

Correct Answer

B:

The alarm policy should reflect the signal's semantics instead of assuming silence is healthy.

Incorrect Answers

A:

Collection failure and a genuine zero are different observations and need separate handling.

C:

Presentation changes cannot supply observations the publisher never sent.

D:

That can conceal a failed collector rather than demonstrate an absence of business activity.

Question 318

A workload account compromise must not allow easy deletion of every recovery copy. Which architecture improves isolation?

  1. Store every backup under the workload's same unrestricted administrator role
  2. Store protected backup copies in a separately controlled account
  3. Keep only a backup volume attached to the source instance
  4. Create a second vault but grant the compromised workload role full deletion authority there

Explanation

Correct Answer

B:

Independent administration and suitable retention controls reduce dependence on the compromised workload identity.

Incorrect Answers

A:

A compromise of that role can extend to all recovery copies.

C:

The recovery copy remains exposed to the same host and account control path.

D:

A separate container does not isolate recovery data if the same identity can erase it.

Question 319

A new web release serves HTTP 200 but its checkout workflow fails. Which test would reveal this before broad rollout?

  1. An end-to-end test that exercises checkout and validates business results
  2. A static HTML lint check only
  3. A TCP port-open check only
  4. An image-pull test only

Explanation

Correct Answer

A:

A successful response code alone does not establish that the transaction workflow completed correctly.

Incorrect Answers

B:

Markup quality cannot prove the backend transaction succeeds.

C:

Network reachability does not exercise application business logic.

D:

Container retrieval does not validate behavior after startup.

Question 320

An offline deployment agent must verify that a package came from the authorized release signer. What evidence is needed?

  1. A verifiable digital signature and trusted verification key
  2. The package's compression ratio
  3. A checksum stored beside the package by any uploader
  4. A readable file name containing approved

Explanation

Correct Answer

A:

Signature verification authenticates the signer and detects content modification, assuming the trust key is protected.

Incorrect Answers

B:

Compression characteristics cannot establish release authorization.

C:

An attacker who replaces the package could replace an unauthenticated checksum as well.

D:

A name is an assertion, not cryptographic evidence of origin.

AWS Certified DevOps Engineer - Professional DOP-C02 Practice Tests