Question 160
A VPC-connected CodeBuild job in private subnets must download dependencies from public registries. No proxy exists. What network design provides access?
- A public ALB in front of CodeBuild
- A route directly to an internet gateway only
- Private routes through a NAT gateway with appropriate security rules
- A larger build compute size
Explanation
Correct Answer
C:Build interfaces do not receive public IP addresses; NAT provides outbound internet connectivity from private addresses.
Incorrect Answers
A:Load balancers handle inbound application requests, not arbitrary outbound dependency downloads.
B:An internet-gateway route does not supply public addresses to CodeBuild's private interfaces.
D:Additional CPU and memory do not create an internet route.
Question 161
A role trust policy permits a caller, but the assumed role cannot write the required bucket. What should be checked?
- Change only the session name
- Create another identity provider without modifying permissions
- Expand trust to every AWS account
- The role session's effective permissions and applicable resource controls
Explanation
Correct Answer
D:Trust authorizes role assumption; it does not automatically grant the session access to target resources.
Incorrect Answers
A:Session naming is not a substitute for an allow on the operation.
B:Federation setup does not itself authorize bucket writes.
C:More potential callers do not grant the missing bucket action.
Question 162
A Dockerfile copies a secret and deletes it in a later layer. Why is this unsafe?
- Only the final directory listing matters
- The image digest encrypts every file
- Earlier layers can still contain the secret
- Deleting a file always removes all earlier layers
Explanation
Correct Answer
C:Layered image history can preserve deleted content; use supported secret injection rather than baking credentials into layers.
Incorrect Answers
A:An empty visible path does not prove the underlying image history lacks the secret.
B:A content digest identifies data; it is not an encryption mechanism.
D:Later filesystem changes do not rewrite already-created layer contents.
Question 163
A service should alert when three of five recent periods breach, tolerating isolated spikes. What configuration fits?
- Set five evaluation periods and five datapoints to alarm
- Five evaluation periods and three datapoints to alarm
- Set one evaluation period and one datapoint to alarm
- Set three evaluation periods and three datapoints to alarm
Explanation
Correct Answer
B:M-of-N evaluation requires enough breaches within the window without demanding all periods breach.
Incorrect Answers
A:That requires all five periods to breach, rather than the specified three within the window.
C:A single spike would satisfy the condition, violating the requested tolerance.
D:That requires three breaches within a shorter three-period window, not any three of five.
Question 164
A production stack should resist an accidental DeleteStack request while allowing approved updates. Which control fits?
- Remove all stack outputs
- Set every resource's UpdateReplacePolicy to Delete
- Enable stack termination protection
- Use a longer stack name
Explanation
Correct Answer
C:The control protects stack deletion; resource-level update restrictions require separate mechanisms.
Incorrect Answers
A:Outputs do not authorize or prevent stack deletion.
B:That controls replacement cleanup and does not block DeleteStack.
D:Names provide identification rather than deletion protection.
Question 165
A CloudFront distribution needs an ACM certificate for its custom hostname. In which Region should the certificate be requested?
- Only the origin EC2 instance's Region
- The Region with the lowest current spot price
- US East (N. Virginia), us-east-1
- Any Region chosen by the billing owner
Explanation
Correct Answer
C:CloudFront's ACM integration requires the viewer certificate in that Region, even when origins are elsewhere.
Incorrect Answers
A:Origin placement does not determine the required viewer-certificate Region.
B:Compute pricing has no bearing on certificate attachment rules.
D:Billing ownership does not remove the integration requirement.
Question 166
Interruptible workers can tolerate retries but need resilient low-cost capacity. Which fleet strategy fits?
- Use one Spot instance type in one Availability Zone
- Diversify Spot instance types and AZs with appropriate capacity allocation
- Assume Spot instances provide an uninterrupted capacity guarantee
- Keep task progress exclusively in volatile instance memory
Explanation
Correct Answer
B:Multiple capacity pools reduce dependence on one scarce pool, while interruption handling preserves work.
Incorrect Answers
A:A single capacity pool exposes all workers to the same shortage or interruption conditions.
C:Interruption-tolerant operation still requires retries and diversified capacity planning.
D:An interruption can erase uncheckpointed work and undermine reliable retry or recovery.
Question 167
A repository requires at least 85% branch coverage. Reports currently show 72%, but releases continue. How should enforcement be added?
- Rename the report to required.xml
- Run a coverage threshold check that exits nonzero below 85%
- Set deployment traffic to 85%
- Increase the report group's retention
Explanation
Correct Answer
B:Publishing coverage is observational; an explicit failing command makes the quality gate actionable.
Incorrect Answers
A:A file name alone cannot implement a numeric coverage policy.
C:Traffic routing percentages do not measure exercised source branches.
D:Historical visibility does not enforce a minimum percentage.
Question 168
ECS task capacity is insufficient under load, but the EC2 cluster also has no free resources. What must scaling address?
- Raise service desired task count only
- Scale EC2 instances but keep the service task count fixed despite excess load
- Increase the ALB idle timeout as the capacity mechanism
- Both service task demand and underlying cluster capacity
Explanation
Correct Answer
D:More desired tasks cannot run if the placement layer lacks CPU, memory, or suitable instances.
Incorrect Answers
A:Additional desired tasks remain pending when the EC2 placement layer lacks resources.
B:Free hosts do not themselves increase the number of application tasks serving requests.
C:Connection timing does not create application tasks or host resources.
Question 169
A build may upload artifacts only under releases/app-a/ in one bucket. Which policy scope fits?
- Grant only ListAllMyBuckets
- Allow PutObject only on the bucket ARN without an object suffix
- Allow s3:* on all resources
- Limit object-write actions to that bucket's releases/app-a/* object ARN
Explanation
Correct Answer
D:Object permissions use object ARNs; add only separately justified bucket-level permissions for required operations.
Incorrect Answers
A:Account bucket listing does not authorize artifact uploads.
B:Object actions require the applicable object resource scope.
C:That exceeds both the specified operation and prefix scope.
Question 170
A team wants CloudFormation provisioning to use a controlled identity instead of each operator's broad permissions. What should it configure?
- A public S3 object ACL
- An application EC2 key pair
- A least-privilege CloudFormation service role
- A repository branch tag
Explanation
Correct Answer
C:The service assumes this role for stack operations; control who may pass it and operate stacks that use it.
Incorrect Answers
A:Public artifact access cannot scope stack execution privileges.
B:SSH keys authorize host login, not CloudFormation resource provisioning.
D:Version-control metadata does not establish an AWS service identity.