Question 1
A CodePipeline pipeline in account A assumes a deployment role in account B. Role assumption succeeds, but downloading an artifact encrypted with the AWS managed S3 key fails. The artifact bucket is in A. Which change provides the required cross-account artifact access?
- Grant the deployment role AdministratorAccess in B without changing the artifact encryption.
- Use a customer managed KMS key, authorize the deployment role to decrypt, and grant it access through the artifact bucket policy.
- Copy the AWS managed key alias into the deployment role trust policy.
- Grant the pipeline role permission to pass the deployment role instead of assuming it.
Explanation
Correct Answer
B:A customer managed key supports explicit cross-account authorization. The consuming role needs both S3 access and KMS decryption permission; neither permission substitutes for the other.
Incorrect Answers
A:Broader permissions inside B do not establish access to the bucket and encryption key owned by A. Cross-account authorization must include the resource side.
C:A trust policy controls who can assume a role. Naming an encryption-key alias there cannot authorize object decryption.
D:PassRole lets a caller assign a role to a service. It does not replace the artifact consumer's S3 and KMS permissions.
Question 2
A Lambda release must receive 10% of alias traffic for five minutes before the remaining traffic moves. CodeDeploy must roll back when a configured error alarm enters ALARM. Which deployment setup meets this requirement?
- Use an all-at-once deployment with an alarm.
- Use a linear deployment that adds 10% every minute.
- Publish a version without changing the alias.
- Use CodeDeployDefault.LambdaCanary10Percent5Minutes, associate the alarm, and enable automatic rollback on alarm.
Explanation
Correct Answer
D:Canary routing holds the initial portion before the final shift. Alarm monitoring detects the regression, while automatic rollback supplies the requested recovery behavior.
Incorrect Answers
A:The alarm can detect a regression, but all-at-once routing exposes all traffic immediately rather than providing the required trial interval.
B:Linear routing advances in repeated increments. It does not hold the initial allocation for the specified five-minute interval.
C:Publishing creates an immutable version, but callers using the alias continue reaching its existing version until routing changes.
Question 3
A CodeBuild buildspec uses version 0.1. One command changes directories, but the next command runs from the original directory and fails. The team wants normal shell state to persist across commands. What should it change?
- Migrate the buildspec to version 0.2.
- Increase the build timeout.
- Move the directory command into the artifacts section.
- Enable a local dependency cache.
Explanation
Correct Answer
A:Version 0.1 isolates commands in separate shell instances. Version 0.2 removes that restriction, allowing directory changes and shell variables to persist as expected.
Incorrect Answers
B:A longer execution allowance cannot change the working directory or how commands are isolated. The failure is deterministic rather than a timeout.
C:The artifacts section selects output files for collection. It is not an execution phase and cannot establish shell state.
D:Caching reuses files between builds to reduce work. It does not change the shell semantics of the buildspec version.
Question 4
A release pipeline must stop after staging tests until a change manager explicitly accepts that execution. An SNS message alone must not permit production deployment. Which configuration supplies the required gate?
- Send an SNS notification from the test action and keep production in the next stage.
- Add a fixed-duration sleep in CodeBuild before production.
- Insert a CodePipeline manual approval action before production and grant designated reviewers approval permission.
- Require a reviewer comment on the repository after the pipeline has passed production.
Explanation
Correct Answer
C:The approval action pauses that execution until an authorized decision occurs. Rejection or expiration fails the action rather than silently releasing to production.
Incorrect Answers
A:Notification delivery informs a person but does not suspend pipeline progression. The next stage could deploy before any review occurs.
B:A delay eventually expires without a decision. It also consumes build time without implementing authorization to accept or reject a release.
D:A comment added after deployment cannot serve as a preventive control. It records feedback only after the protected action has occurred.
Question 5
An application build downloads dependencies that can change between runs. Staging passes, but rebuilding the same commit for production produces different bytes. Which pipeline design ensures production receives the package that staging tested?
- Run the production build from the same branch name.
- Build once and pass that execution's output artifact to both staging and production deployment actions.
- Rebuild after approval using the newest dependency versions.
- Run staging tests against the source artifact and compile only in production.
Explanation
Correct Answer
B:Both deployment actions consume the packaged output from the same build. Environment-specific configuration should be supplied separately without rebuilding the application package.
Incorrect Answers
A:A branch name identifies a moving source reference and does not freeze dependencies. Even an unchanged commit can produce a different build.
C:Resolving dependencies again can change the delivered binary. Approval of the earlier package does not validate the rebuilt output.
D:Source-level testing does not establish that the eventual compiled package matches what was exercised in staging. The deployment artifact itself must be promoted.
Question 6
A platform team must deploy a baseline CloudFormation stack to existing and newly created accounts in a designated organizational unit. AWS Organizations trusted access is enabled. Which configuration minimizes per-account onboarding?
- Create a self-managed StackSet and wait for each account to create its execution role manually.
- Create a nested stack in the management account for each new account.
- Create one ordinary stack with an account ID parameter set to the OU ID.
- Use a service-managed StackSet targeting the OU with automatic deployment enabled.
Explanation
Correct Answer
D:Service-managed StackSets integrate with Organizations. Automatic deployment applies the baseline when accounts join the targeted OU, within the configured Regions.
Incorrect Answers
A:Self-managed permissions require the necessary roles and explicit deployment management. That approach does not provide the requested automatic OU onboarding.
B:Nested stacks organize resources under a parent stack. They do not make account creation trigger deployment into the new account.
C:Changing a parameter does not change the account in which an ordinary stack creates resources. An OU is not an execution account.
Question 7
An RDS resource must remain protected from accidental replacement during CloudFormation updates, while application resources in the same stack remain updatable. The control need not prevent direct RDS API calls. Which mechanism fits?
- A stack policy allowing updates generally but denying Update:Replace and Update:Delete for the database logical resource.
- Termination protection alone on the stack.
- An RDS IAM policy allowing all actions to the deployment role.
- A DeletionPolicy of Retain as the only safeguard.
Explanation
Correct Answer
A:Stack policies restrict update actions on selected logical resources. An explicit deny protects the database during stack updates while other resources can remain allowed.
Incorrect Answers
B:Termination protection blocks deletion of the stack. It does not generally prevent an update from replacing an individual resource.
C:An allow policy authorizes operations rather than protecting a resource against particular CloudFormation update actions.
D:Retention preserves a resource when applicable deletion processing occurs. It does not prohibit CloudFormation from attempting a replacement during an update.
Question 8
A deployment reviewer needs to inspect whether a proposed CloudFormation template will replace resources before any changes are applied. Which sequence supports that review?
- Execute UpdateStack and inspect events afterward.
- Run template syntax validation and treat success as proof of no replacements.
- Create and inspect a change set, then execute it only after review.
- Enable stack termination protection and apply the template directly.
Explanation
Correct Answer
C:A change set exposes proposed resource actions before execution. Reviewing it supports a release decision, although runtime conditions can still cause an approved update to fail.
Incorrect Answers
A:Stack events describe operations already attempted or underway. They cannot provide the required approval point before execution.
B:Syntax validation checks template structure. It does not compare the proposed resource configuration with the running stack to identify replacements.
D:Termination protection addresses deletion of the entire stack. It does not preview the effects of a proposed update.
Question 9
EC2 workers process SQS messages in an average of four seconds each. The acceptable queue wait is 80 seconds, and throughput scales with the number of workers. Which target-tracking design best relates capacity to this latency objective?
- Target 80 visible messages for the whole queue regardless of fleet size.
- Target approximately 20 visible messages per in-service worker using queue-depth and capacity metrics.
- Target 20% CPU even though workers spend most processing time waiting on remote I/O.
- Target the age of the oldest message at 80 seconds without a capacity-normalized utilization metric.
Explanation
Correct Answer
B:Dividing acceptable wait by processing time gives an approximate per-worker backlog target. Capacity normalization lets the metric decrease as workers are added.
Incorrect Answers
A:A fixed fleet-wide depth does not express how much work each worker must clear. Its relationship to waiting time changes as capacity changes.
C:Low CPU can coexist with an I/O-bound backlog. This signal may not reflect the amount of queued work or its waiting-time objective.
D:Message age is useful for alerting, but it does not provide the proportional per-capacity utilization relationship expected for this target-tracking design.
Question 10
A supported EBS-backed EC2 instance outside an Auto Scaling group must recover from underlying host failure while retaining its instance identity. CloudWatch action-based recovery is supported for this configuration. Which alarm and action should operations configure?
- An alarm on StatusCheckFailed_Instance that terminates the instance.
- A CPUUtilization alarm that launches an unrelated replacement instance.
- An alarm that reboots the guest whenever network traffic falls.
- An alarm on StatusCheckFailed_System that performs EC2 recovery.
Explanation
Correct Answer
D:The system check detects infrastructure problems. Recovery attempts to move the supported instance to healthy hardware while preserving its identity; applications must tolerate loss of in-memory state.
Incorrect Answers
A:The instance check concerns the guest environment. Termination also destroys the running instance identity rather than recovering it.
B:CPU activity does not specifically identify host failure, and launching a separate instance does not preserve the original instance identity.
C:A guest reboot targets operating-system recovery. It does not supply the host-migration behavior required for infrastructure failure.