Answers & explanations
Practice Set 3: every answer explained.
All 75 questions from this set, with the correct answer marked and a full explanation of why it is right — and why each plausible alternative is not. 14 of them are multi-answer, which the AWS DevOps Engineer exam uses heavily. Read it as a study sheet, or take the set under timed conditions first and come back.
Every question here is original, written for this site to match the style and difficulty of the real exam. None are reproduced from an actual exam — that would breach the certification agreement and would not teach you anything.
- Q1
A software vendor keeps its application source in a GitHub repository that AWS CodePipeline reads through an AWS CodeConnections connection. Engineers push to main many times a day, but a release must only be cut when a maintainer pushes an annotated semantic-version tag such as v4.12.0. The existing pipeline is a V1 pipeline that starts on every push to main, and the release engineers are tired of cancelling runs.
Which change starts the pipeline only on a release tag with the least ongoing maintenance?
- A Keep the V1 pipeline and set the source action branch name to the tag that is being released before each run.
- B Keep the V1 pipeline and add a first-stage CodeBuild action that inspects the commit and fails the build when no version tag points at it.
- C Convert the pipeline to the V2 pipeline type and add a trigger on the source action with a push filter that includes git tags matching v*.*.*. Correct
- D Keep the V1 pipeline and create an Amazon EventBridge rule on repository tag events from the connection that calls StartPipelineExecution.
Why C
Only the V2 pipeline type carries trigger configuration, and its push filters accept git tags with wildcard include and exclude patterns, so a filter on v*.*.* starts a run for a release tag and for nothing else. Setting a V1 source action branch field to a tag name does not work — that field names a branch, accepts no wildcards, and would need a pipeline edit for every release. Adding a build action that inspects the commit still starts and bills a full execution for every push and leaves a trail of failed runs that the team has to interpret. Repository tag events from a third-party provider reached through a connection are not delivered to EventBridge, so a rule built on them never fires.
- Q2
A logistics company runs an Amazon RDS for PostgreSQL instance named freight-core in eu-west-1 as a Multi-AZ deployment, and also maintains an asynchronous cross-Region read replica of it in eu-central-1 for disaster recovery. During a game day the team is asked to document exactly how much committed data each recovery path can lose so that the runbook states an honest RPO for each.
Which statement correctly describes the recovery point that each path offers?
- A Both the Multi-AZ standby and the cross-Region read replica are kept current by synchronous replication, so neither path loses committed transactions.
- B The Multi-AZ standby is maintained by synchronous replication, so an automatic failover loses no committed transactions; promoting the asynchronous cross-Region read replica can lose any transactions that had not yet been shipped, which is a nonzero RPO. Correct
- C Both paths replicate asynchronously and therefore share the same nonzero RPO; the only difference between them is that the Multi-AZ failover completes faster.
- D Promoting the cross-Region read replica gives the lower RPO, because a replica continuously applies transaction log records while the Multi-AZ standby is rebuilt from the most recent automated snapshot.
Why B
Multi-AZ replication is synchronous — RDS does not acknowledge a commit until the write is durable on the standby as well — so an automatic failover is effectively a zero-RPO event, and the cost is availability time while the endpoint is remapped, not data. A cross-Region read replica ships changes asynchronously, so anything still in flight when the primary is lost is gone once the replica is promoted, making its RPO equal to the replica lag at the moment of failure. Describing both as synchronous misstates the replica, and describing both as asynchronous misstates the standby. The claim that the standby is rebuilt from a snapshot describes neither mechanism: the standby is continuously updated block for block.
- Q3
A logistics company runs 210 Amazon EC2 instances across us-east-1, eu-central-1, and ap-south-1. AWS sends scheduled instance-retirement notices to the account root email address, and one notice was missed last quarter, which caused an unplanned outage when the underlying host was retired. The operations team wants every scheduled-change notice to open a ticket in its incident system automatically.
Which approach meets this requirement with the least operational overhead?
- A Run an hourly AWS Lambda function that calls the AWS Health DescribeEvents API, records the event ARNs it has already processed in an Amazon DynamoDB table, and opens a ticket for anything new.
- B Add the operations distribution list as the operations alternate contact on the account so that retirement notices reach the whole team instead of one mailbox.
- C Create an Amazon EventBridge rule on the default event bus in each Region that matches the aws.health source and the scheduledChange event type category, and target an AWS Lambda function that creates the ticket. Correct
- D Create an Amazon CloudWatch alarm on the StatusCheckFailed_System metric for every instance and send the alarm to an Amazon SNS topic subscribed to the ticket system's intake address.
Why C
AWS Health publishes account-specific events to the default EventBridge bus in the Region where the event occurs, so a rule per Region filtering on the aws.health source and the scheduledChange category captures retirement notices the moment AWS raises them, with no polling code and no missed mail. Polling DescribeEvents works but requires a Business or Enterprise Support plan, a scheduler, and a deduplication table that the team then owns and must operate. Setting an alternate contact only redirects email and still leaves a human to open the ticket. A system status check alarm is reactive rather than predictive: it fires once the host is already impaired, which is precisely the outage the team is trying to avoid.
- Q4
A DevOps engineer maintains an AWS CodeBuild project that builds a container image from a Dockerfile whose first eight layers install unchanging OS packages and Python wheels. Those layers take about four minutes of every six-minute build because the project has no caching configured, so every build rebuilds them from scratch. Builds run roughly every fifteen minutes on a Linux standard image.
Which change gives the fastest reuse of those unchanged layers between consecutive builds with the least configuration?
- A Enable local caching on the project with the Docker layer cache mode and run the build environment in privileged mode. Correct
- B Enable Amazon S3 caching on the project and list the Docker storage directory under the cache paths in the buildspec.
- C Bake the eight unchanging layers into a custom build image, publish it to Amazon ECR, and use it as the project build environment image.
- D Move the project to a larger compute type so the layers are rebuilt on faster vCPUs and more memory.
Why A
The Docker layer cache mode of CodeBuild local caching keeps the layer store on the build host so a following build on that host reuses the eight unchanged layers, and the documented requirement for it is a Linux environment with privileged mode enabled. S3 caching copies declared paths in and out of a bucket between builds, and the Docker storage directory is not a supported cache path — the upload and download of a multi-gigabyte layer store would also erase the saving. Baking the layers into a custom build image does cut the work, but it adds an image to rebuild and re-publish whenever a package changes. A larger compute type shortens the same work rather than skipping it.
- Q5
A SaaS company runs 40 AWS Lambda functions that write to separate Amazon CloudWatch Logs log groups. The security team wants every log line containing the token ERROR to be searchable in an existing Amazon OpenSearch Service domain within about a minute of being written, and wants the same records archived to Amazon S3 for a seven-year audit retention.
Which approach meets both requirements with the least operational overhead?
- A Schedule a Lambda function every five minutes to call FilterLogEvents on each log group and index the matching events into the OpenSearch Service domain, writing a copy to Amazon S3.
- B Create an hourly CloudWatch Logs export task for each log group that writes to Amazon S3, then run an AWS Glue crawler over the bucket so the data can be queried with Amazon Athena.
- C Create a CloudWatch Logs subscription filter on each log group with an ERROR filter pattern that delivers to an Amazon Data Firehose stream, and configure the stream to deliver to the OpenSearch Service domain and to back up all records to Amazon S3. Correct
- D Create a CloudWatch Logs metric filter for ERROR on each log group and configure an alarm on the resulting metric to publish to an Amazon SNS topic that the OpenSearch Service domain subscribes to.
Why C
A subscription filter is the only mechanism that streams matching log events out of CloudWatch Logs continuously, and Amazon Data Firehose is a managed destination that can both index into OpenSearch Service and write every record to S3 in one delivery stream, so a single configuration satisfies the search requirement and the archive requirement. Polling FilterLogEvents on a schedule reintroduces latency, paging logic, and checkpoint state that must be maintained. Export tasks are batch jobs with per-account concurrency limits and delivery measured in minutes to hours, which cannot meet a one-minute target. A metric filter only produces a numeric count, it does not carry the log line, and OpenSearch Service cannot subscribe to an SNS topic.
- Q6
A financial services company wants to require IMDSv2 on every Amazon EC2 instance after a server-side request forgery report elsewhere in the industry. The fleet includes 60 long-lived instances running an application built on an older SDK, and the platform team is unwilling to switch the metadata option to required until it knows which instances still issue IMDSv1 calls.
How should the team identify the instances that are still using IMDSv1 before enforcement?
- A Review the per-instance MetadataNoToken CloudWatch metric in the AWS/EC2 namespace over a representative window, and switch only the instances whose count stays at zero. Correct
- B Enable VPC flow logs on the subnets and filter for traffic to 169.254.169.254 to see which instances call the metadata service without a token.
- C Enable AWS CloudTrail data events for the EC2 service so that each metadata request is logged with the calling instance ID.
- D Use AWS Systems Manager Run Command to curl the metadata endpoint on every instance and record which instances answer without a token.
Why A
EC2 publishes MetadataNoToken to CloudWatch for each instance, counting metadata requests served over IMDSv1. A sustained zero across a window that covers the application's full workload is the evidence needed to flip HttpTokens to required safely. VPC flow logs never help here because link-local traffic to 169.254.169.254 is not captured by flow logs at all. CloudTrail does not record instance metadata requests: the metadata service is answered locally on the instance and is not an AWS API call, so no data event type exists for it. Running curl through Run Command only proves the endpoint still accepts token-less requests, which every instance does until enforcement, and says nothing about which applications depend on that behavior.
- Q7
A platform team owns a networking AWS CloudFormation stack that publishes a VPC ID and six subnet IDs as stack outputs with Export names. Twelve application stacks consume them with Fn::ImportValue. The team now needs to retire one subnet, and CloudFormation refuses the update because the export is in use. The team wants the networking stack to stay independently updatable and the application stacks to keep reading current values.
Which approach should the team adopt to share these values going forward?
- A Convert the twelve application stacks into nested stacks of the networking stack and pass the IDs down as parameters.
- B Publish each value as an AWS Systems Manager Parameter Store parameter and have the application templates consume it through an AWS::SSM::Parameter::Value<String> parameter type. Correct
- C Keep the exports and add a DependsOn attribute in each application template so CloudFormation orders the updates correctly.
- D Copy the current IDs into a Mappings section in each application template and edit the twelve templates whenever the network changes.
Why B
A cross-stack export is locked for as long as any stack imports it, which is exactly the deadlock described, and the lock is by design. Parameter Store breaks the coupling: the networking stack writes the current IDs as parameters, and each application template declares a parameter of an SSM parameter type that resolves the value at deploy time, so the producer can change without asking permission from the consumers. Nesting the application stacks makes one enormous stack whose every deployment is coupled to the network. DependsOn only orders resources inside a single template and has no effect on export locking. Hardcoding the IDs into Mappings guarantees drift and twelve manual edits.
- Q8
A trading analytics platform runs an Amazon Aurora PostgreSQL cluster in us-east-1. Disaster recovery today consists of a nightly cross-Region snapshot copy to eu-west-1. A new resilience requirement sets an RPO of roughly one second and an RTO of a few minutes for the loss of the primary Region, and the business also wants low-latency reads served from Europe.
Which approach meets the new RPO and RTO?
- A Convert the cluster to an Aurora global database with a secondary cluster in eu-west-1, serve European reads from that secondary, and promote it to a standalone writer during a Regional event. Correct
- B Add a second Aurora reader instance in another Availability Zone in us-east-1 and rely on Aurora automatic failover between the writer and that reader.
- C Replace the nightly snapshot copy with an hourly AWS Backup cross-Region copy job and restore the copied snapshot into eu-west-1 when the primary Region is impaired.
- D Enable cross-Region automated backup replication to eu-west-1 and perform a point-in-time restore into a new cluster in that Region when the primary Region is impaired.
Why A
An Aurora global database replicates at the storage layer to the secondary Region with typical lag well under a second, and the secondary cluster is a live, readable cluster that can be promoted in minutes — which is exactly the combination of sub-second RPO, low RTO, and local reads the requirement describes. Adding a reader in a second Availability Zone improves availability inside us-east-1 and does nothing for the loss of the whole Region. An hourly cross-Region backup copy caps the RPO at an hour, an order of magnitude worse than required. Replicated automated backups still require a full restore into a brand-new cluster, which takes far longer than a few minutes for a cluster of any size and leaves Europe with no local reads.
- Q9
An online retailer needs a paging workflow for its checkout API. When the p99 latency alarm named checkout-latency-high enters ALARM, the primary on-call engineer must be paged; if nobody acknowledges within five minutes, the secondary on-call must be paged. Responders also need a chat channel opened and a diagnostic runbook attached to the record so the timeline is captured for the postmortem.
Which configuration meets these requirements with the least custom code?
- A Create an Amazon SNS topic with the primary and secondary engineers subscribed by SMS, and set the alarm action to publish to that topic.
- B Create an AWS Systems Manager Incident Manager response plan with an escalation plan whose first stage engages the primary contact and whose second stage engages the secondary after five minutes, attach a chat channel and an automation runbook to the plan, and set the CloudWatch alarm to start an incident from that response plan. Correct
- C Create an Amazon SNS topic and subscribe an AWS Lambda function that re-publishes the message every five minutes until an engineer writes an acknowledgement row to an Amazon DynamoDB table.
- D Configure Amazon Q Developer in chat applications to post the alarm into the on-call Slack channel and rely on the channel members to pick the incident up.
Why B
Incident Manager is the managed service that models contacts, engagement plans, and time-boxed escalation stages, and a response plan can also open a chat channel and attach Systems Manager Automation runbooks while recording a timeline for the postmortem. A CloudWatch alarm can start an incident from that plan directly. An SNS topic has no acknowledgement or escalation semantics, so both engineers are notified at once and nobody is guaranteed to respond. The Lambda re-publishing loop reimplements escalation and acknowledgement as code the team must maintain, and still produces no incident record. Chatbot delivers the alarm into Slack but has no paging, no escalation timer, and no way to detect that the message went unread.
- Q10 Choose 2
A company runs AWS CodePipeline in a tooling account and deploys into a separate production account with a CloudFormation deploy action that assumes a role in production. The pipeline artifact bucket lives in the tooling account and is encrypted with a customer managed AWS KMS key. The deploy action fails with an access denied error while retrieving the input artifact, although the cross-account role is assumed successfully.
Which two changes are required for the production role to read the artifact?
- A Add a statement to the KMS key policy that allows the production account deployment role to call kms:Decrypt and kms:DescribeKey. Correct
- B Add a bucket policy on the artifact bucket that allows the production account deployment role s3:GetObject and s3:GetObjectVersion. Correct
- C Switch the artifact bucket to the AWS managed key aws/s3 and grant the production role kms:Decrypt in its own IAM policy.
- D Enable cross-Region replication of the artifact bucket into a bucket owned by the production account.
- E Grant the tooling account pipeline service role s3:PutObject on a new artifact bucket created in the production account.
Why A and B
Cross-account artifact access needs permission on both the object and the key that encrypts it, and because both resources live in the tooling account each needs a resource policy naming the production role — a bucket policy for the object reads and a KMS key policy statement for the decrypt. Moving to the AWS managed key makes the problem permanent, because the key policy of an AWS managed key cannot be edited to trust another account. Replicating the bucket copies objects but does not change which principal CodePipeline hands to the deploy action, and the replica is not what the action reads. Writing artifacts into a production bucket reverses the flow and leaves the deploy action still reading the tooling bucket.
- Q11
A cost review at a retailer finds that Amazon CloudWatch Logs storage is the second-largest line item on the bill. Investigation shows roughly 900 log groups created automatically by AWS Lambda and Amazon ECS over four years, every one of them still set to Never expire. Compliance requires that one specific set of audit log groups stay readable for seven years; everything else is only useful for about a month.
Which approach reduces the ongoing cost while keeping the audit data, with the least ongoing effort?
- A Delete the log groups that contain data older than one year, and repeat the cleanup each quarter.
- B Set a three-day retention policy on every log group and rely on CloudWatch Logs Insights to query anything older when an investigation needs it.
- C Remove the logs:CreateLogStream and logs:PutLogEvents permissions from the Lambda execution roles and ECS task roles that generate the largest volume.
- D Set a 30-day retention policy on every log group, export or subscribe the audit log groups to Amazon S3 where a lifecycle rule moves objects to an archival storage class, and add an automation rule that applies the retention setting to newly created log groups. Correct
Why D
CloudWatch Logs charges for ingestion and then for stored data indefinitely when no retention is set, so the fix is a retention policy on every group plus a cheaper destination for the small subset that genuinely needs seven years — S3 with a lifecycle transition costs a fraction of CloudWatch Logs storage — and an automation rule keeps newly created groups from silently reverting to Never expire. Deleting whole log groups by hand is manual, destroys recent data along with old, and the groups reappear on the next invocation. A blanket three-day retention loses the audit data outright, and Logs Insights can only query events still inside the retention window. Stripping logging permissions removes the troubleshooting signal entirely.
- Q12
A security team at a company with 45 AWS accounts in AWS Organizations must answer two recurring audit questions: which IAM roles and S3 buckets grant access to principals outside the organization, and which IAM roles and users have not been used in the last 90 days so that they can be removed.
Which approach produces both answers as continuously updated findings with the least operational overhead?
- A Use IAM Access Advisor in each account to review service last accessed data, and export the results monthly to an Amazon S3 bucket for the auditors.
- B Run a monthly AWS Lambda function that calls GetAccountAuthorizationDetails in each account, parses every trust policy and resource policy, and writes a report to Amazon S3.
- C Create one IAM Access Analyzer external access analyzer with the account as the zone of trust in each member account, and query AWS CloudTrail Lake for role usage over 90 days.
- D Create an IAM Access Analyzer external access analyzer with the organization as the zone of trust and an unused access analyzer with a 90-day tracking period, both from the delegated administrator account. Correct
Why D
IAM Access Analyzer has two analyzer types that map onto the two questions: an external access analyzer, which evaluates resource and trust policies and reports grants to principals outside the chosen zone of trust, and an unused access analyzer, which reports roles, users, and permissions idle beyond a configured tracking period. Creating both from the delegated administrator covers every member account with no per-account work. Access Advisor shows only which services a principal used and never identifies external access. The custom job reimplements automated reasoning and runs only monthly. Choosing the account as the zone of trust would flag routine cross-account access inside the organization as external, burying the real findings.
- Q13
A payments team publishes an AWS Lambda function behind an alias named live. Releases must expose a new version to ten percent of invocations for ten minutes, then move the remaining traffic in one step, and must revert automatically if a CloudWatch alarm on the function error metric fires during that window. The team already deploys with AWS CodeDeploy.
Which CodeDeploy deployment configuration matches this requirement exactly?
- A CodeDeployDefault.LambdaLinear10PercentEvery1Minute
- B CodeDeployDefault.LambdaAllAtOnce
- C CodeDeployDefault.LambdaCanary10Percent5Minutes
- D CodeDeployDefault.LambdaCanary10Percent10Minutes Correct
Why D
A canary configuration shifts a fixed first slice, holds it for a named interval, then moves everything that is left, which is the two-step pattern described; the ten percent slice and the ten-minute bake period name the configuration precisely. The linear configuration instead adds ten percent every minute until the shift completes, so traffic keeps climbing during the window rather than resting at ten percent. The all-at-once configuration moves the alias in a single step and gives the alarm nothing to observe before full exposure. The five-minute canary has the right shape but halves the bake window, which would let the deployment complete before a slow-burning error alarm reaches its threshold.
- Q14
An Amazon Aurora MySQL-Compatible cluster named catalog-prod was created with Backtrack enabled and a 72-hour target backtrack window. A release script ran an unqualified DELETE twelve minutes ago and removed roughly 2 million rows from the products table. The application is currently serving errors, and the team wants the cluster back to its state just before the DELETE as quickly as possible.
Which action restores the data with the shortest recovery time?
- A Restore the most recent automated snapshot into a new cluster and repoint the application at the new cluster endpoint.
- B Backtrack the existing cluster to a timestamp one minute before the DELETE statement ran. Correct
- C Perform a point-in-time restore to a new Aurora cluster using a target time one minute before the DELETE, then repoint the application.
- D Fail the cluster over to one of its Aurora Replicas so that the application reads from a copy that predates the DELETE.
Why B
Backtrack rewinds an Aurora MySQL cluster in place to a point inside the backtrack window, typically in minutes and without creating a new cluster, so the existing endpoints keep working and no application reconfiguration is needed — which makes it the fastest path when the feature was enabled ahead of time, as it was here. Restoring the latest automated snapshot loses every change made since that snapshot and still produces a new cluster with a new endpoint. A point-in-time restore reaches the right moment but provisions an entirely new cluster from backup, which takes far longer and forces a cutover. Failing over to an Aurora Replica changes nothing, because replicas read the same shared storage volume and see the same deleted rows.
- Q15 Choose 2
A media company discovered a security group in a production VPC that allowed 0.0.0.0/0 on TCP port 22. The compliance policy now requires that any security group permitting unrestricted SSH be corrected automatically within minutes, that the correction be recorded for the auditors, and that groups which were already open before the control was created be corrected too.
Which two actions should the DevOps engineer take to meet these requirements with the least custom code?
- A Enable the AWS Config managed rule restricted-ssh in every Region that hosts workloads, so that existing and newly created security groups are evaluated. Correct
- B Attach a remediation action to the AWS Config rule that runs the AWS-DisablePublicAccessForSecurityGroup automation document with an IAM role that AWS Config can assume, and turn on automatic remediation. Correct
- C Create an Amazon EventBridge rule that matches the AuthorizeSecurityGroupIngress API call in AWS CloudTrail and invokes an AWS Lambda function that revokes the offending rule.
- D Attach a service control policy to the organizational unit that denies the ec2:AuthorizeSecurityGroupIngress action for every principal in the member accounts.
- E Enable Amazon GuardDuty in every Region and subscribe an AWS Lambda function to findings so that open security groups are revoked when they are reported.
Why A and B
AWS Config evaluates existing resources when a rule is first enabled and again on every configuration change, so the managed restricted-ssh rule covers pre-existing groups as well as new ones, and the evaluation history is the audit record. Attaching the automation document as a remediation action with automatic remediation turned on closes the finding within minutes, with no function to maintain. The CloudTrail-driven EventBridge rule reacts only to new API calls, so it would never touch groups that were already open. A policy denying the ingress action blocks legitimate rule changes too. GuardDuty reports suspicious behavior, not configuration drift, and raises no finding for an open security group.
- Q16
A production AWS CloudFormation stack contains an Amazon RDS instance with the logical ID ProdDatabase along with roughly forty other resources. Twice this quarter an engineer submitted a template change that would have replaced the database. The team wants CloudFormation itself to reject any update that replaces or deletes that one resource while leaving normal updates to every other resource in the stack unaffected.
Which control enforces this at update time?
- A Attach a stack policy that denies Update:Replace and Update:Delete on the ProdDatabase logical resource ID and allows Update:* on every other resource. Correct
- B Add the DeletionPolicy attribute with a value of Retain to the ProdDatabase resource in the template.
- C Attach an IAM policy to the engineering role that denies the cloudformation:UpdateStack action on the production stack.
- D Enable termination protection on the production stack.
Why A
A stack policy is evaluated by CloudFormation during an update and is the only one of these controls that can allow most updates while refusing specific update actions on a named logical resource, which is precisely the requirement. DeletionPolicy with Retain does not stop a replacement — it only governs what happens to the physical resource when CloudFormation removes it, so the database would still be replaced and the old instance simply left behind. Denying UpdateStack blocks every change to the stack, including the routine ones the team still needs. Termination protection refuses stack deletion and says nothing about an update that replaces a resource inside a stack that continues to exist.
- Q17
A media platform runs 300 Amazon CloudWatch metric alarms across an Amazon ECS service. A single bad deployment last week put 40 of them into ALARM within two minutes and paged the on-call engineer 40 times. The team wants one page per real incident but wants to keep every individual alarm intact, because the dashboards and runbooks reference them by name.
Which change reduces the paging noise with the least operational overhead?
- A Create a composite alarm whose rule expression combines the meaningful child alarms, move the Amazon SNS paging action onto the composite alarm, and remove the notification actions from the child alarms. Correct
- B Raise the datapoints-to-alarm and evaluation-periods settings on every existing alarm to 15 out of 15 so that transient conditions never page.
- C Replace the 300 metric alarms with a single anomaly detection alarm on the service's CPU utilization metric.
- D Subscribe an AWS Lambda function to every Amazon SNS topic and have it suppress duplicate notifications inside a rolling ten-minute window before forwarding to the paging provider.
Why A
A composite alarm evaluates a rule expression over other alarms, so the child alarms keep evaluating and stay visible on dashboards while only the composite carries the paging action — exactly one notification per correlated incident, configured declaratively with no code. Pushing every alarm to 15 of 15 datapoints does not deduplicate anything; it simply delays all 40 pages by a quarter of an hour and hides short real incidents. Collapsing 300 alarms into one anomaly detection alarm on CPU discards nearly all of the service's coverage and would miss error-rate and latency regressions entirely. A deduplicating Lambda in front of the paging provider is custom code to write, test, and maintain for a problem the service already solves.
- Q18
A company operates 40 AWS accounts in AWS Organizations across six Regions. The security team wants one console view of AWS Foundational Security Best Practices findings for every account and Region, wants newly created accounts to be covered without anyone remembering to act, and does not want to work in the Organizations management account day to day.
Which configuration meets these requirements with the least ongoing administration?
- A Designate a security account as the AWS Security Hub delegated administrator, turn on automatic enablement for new organization accounts and for the security standard, and configure a finding aggregation Region with the other five Regions linked to it. Correct
- B Enable Security Hub in every account and Region, then send invitations from the security account to each member account and accept them individually.
- C Enable Security Hub only in the aggregation Region of each account, and rely on the fact that findings from other Regions are forwarded to that Region automatically.
- D Create an AWS Config aggregator in the security account that collects configuration items from every account and Region, and read the standard's controls from the aggregator.
Why A
Security Hub integrates with Organizations: the management account designates a delegated administrator, and that account can auto-enable Security Hub and the chosen standards in existing and future member accounts. Cross-Region aggregation is separate and explicit, so the aggregation Region must be configured with its linked Regions before findings appear in one place. Manual invitations produce the same membership but must be repeated for every new account and Region, the toil being removed. Findings are never forwarded between Regions on their own, so enabling only the aggregation Region leaves five Regions unassessed. A Config aggregator collects configuration items and Config rule compliance, not Security Hub standard findings.
- Q19
A company builds and deploys from GitHub Actions workflows that authenticate to AWS with an IAM user access key pair stored as a repository secret. A security review requires that no long-lived AWS credential exist anywhere in the repository or the CI system, that credentials expire within an hour, and that only workflows running on the main branch of one named repository can reach the deployment role. The team does not want any compute to operate.
Which approach satisfies these requirements?
- A Rotate the access key pair nightly with a scheduled AWS Lambda function that writes the new key into the GitHub repository secret.
- B Create an IAM OIDC identity provider for token.actions.githubusercontent.com, create a role whose trust policy conditions on the repo and ref values in the token sub claim, and have the workflow exchange its OIDC token for temporary credentials. Correct
- C Store the access key pair in AWS Secrets Manager and have the workflow retrieve it at the start of every job.
- D Move the workflows to a self-hosted runner on an Amazon EC2 instance that carries an instance profile with the deployment permissions.
Why B
GitHub Actions can present a signed OIDC token that describes the repository, the branch and the workflow; registering GitHub as an IAM identity provider and conditioning a role trust policy on the sub claim yields temporary credentials scoped to exactly one repository and branch, with no stored secret at all. Nightly rotation still leaves a valid long-lived key sitting in the repository for up to a day and adds a function to run. Storing the key in Secrets Manager only moves it, and the workflow still needs a credential to read the secret. A self-hosted runner does remove the key but introduces an EC2 fleet to patch and scale, which the team ruled out.
- Q20
An Amazon API Gateway endpoint invokes an AWS Lambda function that queries an Amazon RDS for MySQL db.r6g.large instance. Each weekday at 09:00 the function scales to roughly 1,200 concurrent executions and the database begins returning "Too many connections" errors; each invocation opens its own connection and the burst is legitimate customer traffic that must not be throttled.
Which change resolves the connection exhaustion with the least application change?
- A Edit the DB parameter group to raise max_connections to 20,000 so that every concurrent invocation can hold its own connection.
- B Convert the instance to a Multi-AZ deployment so that the standby absorbs part of the connection load.
- C Provision Amazon RDS Proxy in front of the instance and change the function's connection string to the proxy endpoint, so that database connections are pooled and reused across invocations. Correct
- D Set a reserved concurrency of 50 on the Lambda function so that no more than 50 connections can ever be opened.
Why C
RDS Proxy sits between the function and the database and multiplexes many short-lived client connections onto a small pool of persistent database connections, which absorbs exactly this kind of burst; the only application change is the hostname in the connection string. Raising max_connections far beyond what the instance class can support trades a connection error for memory pressure and instability, because each MySQL connection consumes server memory. Multi-AZ maintains a standby that accepts no client connections at all, so it adds availability and no connection capacity. Reserved concurrency would cap connections but does so by throttling the function, which drops the legitimate customer requests the scenario says must be served.
- Q21
An events platform publishes ticket-purchase events to a custom Amazon EventBridge bus named ticketing-prod, which routes them to an AWS Lambda function. A bad deployment made the function fail for three hours, and the events from that window were never processed. The bus already has an archive with a 30-day retention that was created when the bus was built, and no dead-letter queue was configured on the rule target.
How should the DevOps engineer reprocess the events from the outage window?
- A Start a replay from the archive for the start and end times of the outage, targeting the ticketing-prod bus and the rule that routes to the function. Correct
- B Configure a dead-letter queue on the rule target, then redrive the queue so that the failed deliveries from the outage window are sent to the function again.
- C Increase the rule target's maximum event age and maximum retry attempts, so that EventBridge delivers the events from the outage window once the function is healthy.
- D Query AWS CloudTrail for the PutEvents calls made during the outage window and replay the event payloads recorded in the trail.
Why A
An EventBridge archive captures events that match its filter from the moment the archive exists, and a replay re-sends them to the same bus for chosen rules over a chosen time window, which is exactly the recovery path here because the archive predates the outage. Adding a dead-letter queue now changes nothing retroactively: a DLQ only captures deliveries that fail after the queue exists, and there is nothing in it to redrive. The retry settings are also forward-looking and are capped at 24 hours of event age, so raising them cannot resurrect events whose delivery attempts already ended. CloudTrail does not record the event payloads that flow through an event bus, so there is nothing in the trail to rebuild the events from.
- Q22
A retailer runs about 400 Amazon EC2 instances that are required to have the CloudWatch agent installed and configured from a specific Systems Manager parameter. Instances are launched and terminated all day by several Auto Scaling groups, and troubleshooting sessions occasionally leave the agent stopped or removed. Operations wants every instance carrying the tag Role=web to be checked and corrected on a schedule and wants compliance reported per instance.
Which Systems Manager capability meets this with the least operational overhead?
- A Add the agent installation and configuration commands to the launch template user data of every Auto Scaling group.
- B Create an Amazon EventBridge scheduled rule that runs a Systems Manager Run Command document against the fleet once a week.
- C Create a State Manager association that targets instances by the Role=web tag, runs the agent install and configuration documents, and repeats on a rate schedule. Correct
- D Create an AWS Config custom rule that evaluates each instance and writes noncompliant instance IDs to an Amazon SNS topic for an engineer to fix.
Why C
A State Manager association is the Systems Manager feature built for keeping instances in a defined state: it targets by tag so newly launched instances are picked up without any registration step, it reapplies on a schedule, and it records association compliance per instance. User data runs once at launch and cannot repair an instance that drifts hours later. A scheduled Run Command invocation reapplies the state but has no association compliance record and no automatic handling of instances that appear between runs. A custom Config rule detects the problem and then hands it to a human, which is neither continuous enforcement nor low overhead.
- Q23
An order-processing service publishes a custom metric called OrdersAccepted that follows a strong daily and weekly pattern: about 4,000 per hour at midday on weekdays and under 200 per hour overnight. A static alarm at fewer than 500 orders per hour pages the on-call engineer every night and stayed silent last Tuesday when a broken deployment cut midday volume by 30 percent.
Which alarm configuration detects the real drop while ending the nightly pages, with the least ongoing tuning?
- A Create 24 separate alarms, one per hour of the day, each with a static threshold derived from the previous month's traffic for that hour.
- B Create a CloudWatch anomaly detection model on OrdersAccepted and configure the alarm to fire when the metric falls below the lower edge of the anomaly detection band. Correct
- C Change the alarm's statistic from Average to Sum and raise the period to 24 hours so that overnight volume no longer breaches the threshold.
- D Create a composite alarm that combines the existing threshold alarm with a second alarm so that it only fires during business hours.
Why B
Anomaly detection trains a model on up to two weeks of history and learns the daily and weekly seasonality, producing a band that is wide overnight and tight at midday; alarming on LessThanLowerThreshold against that band therefore ignores the expected nightly trough and catches a 30 percent midday shortfall without anyone maintaining numbers. Twenty-four per-hour alarms encode the seasonality by hand and have to be re-derived every time traffic grows. Summing over a 24-hour period smooths the trough away but also smooths away the outage — a 30 percent dip for a few hours barely moves a daily total. A composite alarm evaluates other alarms and has no notion of time of day, so it cannot express a business-hours window on its own.
- Q24 Choose 2
A DevOps engineer inherits an AWS CodeBuild project whose buildspec.yml contains a hardcoded PostgreSQL password that is also committed to the Git repository. The password has not been changed in over a year. The team wants the credential out of source control, rotated automatically every 30 days, and available to the build without a plaintext value appearing in the project definition or the build log.
Which two changes should the engineer make to meet these requirements?
- A Add the password as a plaintext environment variable on the CodeBuild project and delete the value from buildspec.yml.
- B Store the credential in AWS Secrets Manager and enable rotation on a 30-day schedule using the managed rotation function for the database engine, with network access from the rotation function to the database. Correct
- C Store the credential in AWS Systems Manager Parameter Store as a SecureString and reference it from the buildspec with the PARAMETER_STORE environment variable type.
- D Encrypt the password with AWS KMS, commit the ciphertext in buildspec.yml, and decrypt it in the pre_build phase with the build role.
- E Reference the secret from the CodeBuild project using the SECRETS_MANAGER environment variable type and grant the build service role secretsmanager:GetSecretValue on that secret. Correct
Why B and E
Secrets Manager is the only option here that both stores the credential and rotates it on a schedule, and CodeBuild's SECRETS_MANAGER environment variable type resolves the secret at build time so the value never appears in the project definition, the repository, or the build log. A plaintext project environment variable is visible to anyone who can read the project and is echoed in logs, and it still never rotates. Parameter Store SecureString solves the storage problem but has no rotation of its own, so the 30-day requirement would go unmet. Committing KMS ciphertext keeps a long-lived secret in the repository, where anyone with decrypt permission and the repository can recover it, and the value is still never rotated.
- Q25 Choose 2
A DevOps engineer moves an AWS CodeBuild project into private subnets of a VPC so that integration tests can reach an Amazon RDS database that has no public endpoint. The database connection now works, but every build fails: downloading the source archive times out, and the final docker push to Amazon ECR times out as well. The private subnets currently have only a local route.
Which two changes would let the build reach the source and registry endpoints?
- A Add a route to an internet gateway in the route table associated with the private subnets.
- B Turn on the option that assigns a public IP address to the build environment so the build host can reach the internet directly.
- C Add a NAT gateway in a public subnet and route outbound traffic from the build subnets through it. Correct
- D Add an inbound rule to the build security group that allows TCP 443 from 0.0.0.0/0.
- E Create interface VPC endpoints for the ECR API and ECR Docker registry services and a gateway VPC endpoint for Amazon S3 in the build VPC. Correct
Why C and E
A CodeBuild build inside a VPC runs behind an elastic network interface that never receives a public IP address, so outbound access has to come from either a NAT gateway or VPC endpoints. A NAT gateway in a public subnet gives the build general outbound reachability, and interface endpoints for the two ECR services plus the S3 gateway endpoint carry the image layer and artifact traffic privately. Routing the private subnets straight at an internet gateway does not help, because an interface with no public address cannot use it. There is no public IP assignment option for VPC-configured builds. Security groups are stateful, so the replies to outbound requests are already allowed and an inbound rule changes nothing.
- Q26
A healthcare analytics company must retain daily backups of several Amazon DynamoDB tables and Amazon EBS volumes for seven years. An auditor requires evidence that no identity in the account — including an administrator or the account root user — can delete or shorten the retention of a recovery point before the seven years elapse.
Which control satisfies the auditor's immutability requirement?
- A Write an IAM policy that denies backup:DeleteRecoveryPoint and attach it to every operator role that touches the backup account.
- B Enable Amazon S3 Object Lock in compliance mode on the bucket where the AWS Backup recovery points are stored.
- C Attach a service control policy to the organizational unit that denies backup:DeleteRecoveryPoint for all principals in the member accounts.
- D Apply AWS Backup Vault Lock in compliance mode to the backup vault with a seven-year minimum retention, and let the cooling-off period elapse so the lock becomes permanent. Correct
Why D
Vault Lock in compliance mode is the only one of these that survives an administrator: once the cooling-off period expires, the lock and its retention floor cannot be changed or removed by any principal, including the account root user and AWS Support, which is precisely the evidence an auditor asks for. An IAM deny on operator roles is edited away by anyone holding administrative permissions. A service control policy is stronger but is still mutable by the organization's management account, and it does not apply to that account's own principals. S3 Object Lock is a real immutability control, but AWS Backup recovery points live in service-managed vaults rather than in a customer bucket, so there is no bucket on which to set it.
- Q27
An order service receives events from Amazon EventBridge and processes them with an asynchronously invoked AWS Lambda function. A malformed event caused the function to fail every attempt for two days, and the failures were only noticed when a customer complained. The team now wants every invocation that ultimately fails to be captured together with the error that caused it, and every successful invocation's result to be forwarded to a downstream queue.
Which configuration meets these requirements without adding code to the function?
- A Configure a dead-letter queue on the Lambda function so that failed event payloads are written to an Amazon SQS queue.
- B Configure a dead-letter queue on the EventBridge rule target so that events the rule could not process are written to an Amazon SQS queue.
- C Wrap the handler body in a try/catch block that writes the event and the exception to an Amazon SQS queue on failure and to a second queue on success.
- D Configure Lambda asynchronous invocation destinations with an on-failure destination and an on-success destination, each pointing at an Amazon SQS queue. Correct
Why D
Lambda asynchronous invocation destinations cover both halves of the requirement: an on-failure destination receives an invocation record for events that exhaust their retries, and an on-success destination receives one for events that complete, each record carrying the request context and the response or error payload. A Lambda dead-letter queue is the older mechanism and carries only the event payload, with no error detail and no success path. A dead-letter queue on the EventBridge rule target captures only events EventBridge failed to deliver, which is a different failure from a function that was invoked and then threw. The try/catch approach is code the team maintains and cannot capture timeouts or out-of-memory terminations.
- Q28
A financial services company manages an Amazon Aurora PostgreSQL cluster inside an AWS CloudFormation stack. An upcoming template change alters a property that forces replacement of the cluster, and the stack itself will eventually be decommissioned. The database team requires that a restorable copy of the data survive both events, and does not want an orphaned cluster left running and billing after either one.
Which combination of resource attributes should be set on the cluster?
- A DeletionPolicy set to Snapshot only.
- B UpdateReplacePolicy set to Retain only.
- C DeletionPolicy set to Retain and UpdateReplacePolicy set to Retain.
- D DeletionPolicy set to Snapshot and UpdateReplacePolicy set to Snapshot. Correct
Why D
CloudFormation treats removal on stack deletion and removal caused by a replacing update as two separate events governed by two separate attributes, and both accept Snapshot for a resource type that supports snapshots, such as an Aurora cluster. Setting both to Snapshot produces a restorable copy in each case and lets CloudFormation delete the old cluster afterward, so nothing keeps billing. DeletionPolicy alone leaves the replacement path uncovered, and the replaced cluster would be deleted with no snapshot. UpdateReplacePolicy with Retain covers only the update and leaves the old cluster running. Retain on both preserves the data but abandons two live clusters that nobody is tracking.
- Q29
A multi-tenant API serves about 4,000 tenants across 30 endpoints and records request latency for every call. The current implementation calls PutMetricData once per request with tenant_id and endpoint as dimensions, and the team is now seeing throttling on the CloudWatch API as well as latency added to the request path. Engineers still need to slice latency per tenant when a customer complains.
Which approach preserves the per-tenant detail with the least request-path overhead and without hitting PutMetricData throttling?
- A Write CloudWatch embedded metric format JSON to the application's log stream, declaring the metric values and the dimension sets in the document, and let CloudWatch extract the metrics asynchronously while the full-cardinality records stay queryable in CloudWatch Logs Insights. Correct
- B Buffer metrics in memory and send them in batched PutMetricData calls of up to 1,000 metric data items every 60 seconds.
- C Create one CloudWatch Logs metric filter per tenant on the application's log group so that each tenant gets its own latency metric.
- D Publish a single latency metric with no tenant dimension and derive per-tenant numbers on demand from CloudWatch Logs Insights queries over the raw logs.
Why A
Embedded metric format lets the application emit one structured log line that carries both the metric values and the high-cardinality context; CloudWatch parses the declared dimension sets into metrics out of band, so the request path only writes a log line and never calls the CloudWatch API, which removes both the added latency and the throttling. Batching PutMetricData reduces call volume but still puts an API call, its retries, and its failure modes on the critical path. Per-tenant metric filters collapse immediately against the metric-filter-per-log-group quota, and 4,000 of them would be unmanageable in any case. Dropping the tenant dimension keeps the raw data but gives up alarmable, chartable per-tenant metrics.
- Q30
A company runs an Amazon DynamoDB global table replicated between us-east-1 and eu-west-1 and encrypts a sensitive attribute client-side with the AWS Encryption SDK before writing it. Items written by the application in us-east-1 must be decryptable by the application in eu-west-1 without any cross-Region call to AWS KMS, and both applications must keep using a customer managed key whose policy the security team controls.
Which key configuration meets these requirements?
- A Create an independent customer managed key in each Region and give both keys the same alias, so the SDK resolves the local key by alias.
- B Create a multi-Region primary key in us-east-1 and a replica key in eu-west-1, and let each application use the key in its own Region. Correct
- C Use the AWS managed key for DynamoDB in each Region, because AWS managed keys are shared across the Regions of an account.
- D Create a customer managed key in us-east-1, export its key material, and import the same material into a second key in eu-west-1.
Why B
Multi-Region keys exist for this case: a primary and its replicas share key ID and key material, so ciphertext produced under one can be decrypted by another without a cross-Region call, while each replica keeps its own editable key policy. Two independent keys have different key material and different key IDs regardless of their aliases, so a decrypt attempt in the other Region fails. AWS managed keys are per-Region and per-service, cannot be made interoperable, and give the security team no policy control. KMS never allows the key material of a KMS-generated key to be exported, and imported material placed in two keys still produces two distinct key ARNs, so ciphertext bound to one cannot be decrypted by the other.
- Q31
An AWS CodePipeline pipeline has a Deploy stage containing three actions: a CloudFormation deploy to eu-west-1, a CloudFormation deploy to us-east-1, and a CodeBuild smoke test that queries both regional endpoints. The deploys are independent of each other and each takes about nine minutes. The smoke test must never begin until both deploys have succeeded, and the team wants the stage to finish as quickly as possible.
How should the actions be configured?
- A Give both deploy actions runOrder 1 and give the smoke test action runOrder 2, all within the Deploy stage. Correct
- B Place each deploy in its own stage and the smoke test in a third stage, so the stages run in sequence.
- C Give the eu-west-1 deploy runOrder 1, the us-east-1 deploy runOrder 2, and the smoke test runOrder 3.
- D Create one pipeline per Region on the same source, and schedule the smoke test to run ten minutes after the pipelines start.
Why A
Actions in the same stage that share a runOrder value run in parallel, and CodePipeline does not begin a higher runOrder until every action at the lower value has succeeded, so one stage with the deploys at runOrder 1 and the test at runOrder 2 gives both the concurrency and the barrier the team asked for. Splitting the deploys into separate stages serializes them and roughly doubles the stage time for no benefit. Giving the deploys different runOrder values inside one stage serializes them just as thoroughly. Two pipelines plus a timed test removes the dependency guarantee entirely — a slow deploy would let the smoke test run against a half-updated fleet.
- Q32 Choose 2
A company runs its primary stack behind static IP addresses in us-east-1 and a warm standby in us-west-2. Public DNS is served from an Amazon Route 53 public hosted zone containing two independent A records for api.example.com with a TTL of 3,600 seconds; failover is performed by an engineer editing the record set. During a failover drill, clients kept reaching the impaired primary for more than 40 minutes after the record was changed.
Which two changes together let Route 53 shift traffic automatically and shorten the time clients take to follow it? (Select TWO.)
- A Raise the TTL on both records to 86,400 seconds so that resolvers query Route 53 less often during an incident.
- B Associate a Route 53 health check with the standby record only, so that Route 53 learns when the us-west-2 stack is ready to receive traffic.
- C Replace the two independent records with a failover record set — one primary and one secondary — and associate a Route 53 health check with the primary record. Correct
- D Replace the public hosted zone with a private hosted zone so that resolver caching no longer applies to the record.
- E Lower the TTL on the records to 60 seconds so that resolver caches expire quickly once Route 53 begins returning the standby answer. Correct
Why C and E
Failover routing is what makes the switch automatic: Route 53 returns the primary answer while the health check attached to the primary record is healthy and returns the secondary answer once it is not, with no human editing records. The TTL is what decides how long resolvers keep serving the old answer after that switch, so a 3,600-second TTL is the direct cause of the 40-minute tail and lowering it to 60 seconds is the other half of the fix. Raising the TTL makes the tail dramatically worse. A health check on the secondary record alone gives Route 53 nothing to evaluate for the failover decision, which is driven by the primary. A private hosted zone only answers inside associated VPCs and would take the public name offline.
- Q33
An image-processing AWS Lambda function is invoked asynchronously by Amazon S3 object-created events and writes one row per processed object to an Amazon DynamoDB table. During a throttling episode on the table, several invocations failed part way through and were retried automatically, and the team later found duplicate rows for the same object.
Which change prevents duplicate rows while still allowing recovery from transient failures?
- A Set the function's maximum retry attempts for asynchronous invocation to 0 so that a failed invocation is never repeated.
- B Increase the function timeout and the table's provisioned write capacity so that invocations no longer fail during a throttling episode.
- C Derive a deterministic item key from the S3 bucket, object key, and version ID, and write with a condition expression that the item does not already exist. Correct
- D Set the function's reserved concurrency to 1 so that only one invocation processes objects at a time.
Why C
Asynchronous invocation is at-least-once by design, so the fix belongs in the function's own write path: a key derived deterministically from the object's identity, combined with a condition that the item does not exist, makes a repeated invocation a no-op instead of a second row. Setting retries to 0 removes duplicates by removing the recovery the team still wants, so a single throttled write would silently lose the object. Raising the timeout and write capacity reduces how often retries happen but does nothing about the ones that still occur. Reserved concurrency of 1 only serializes invocations, and a retried invocation running alone writes the duplicate just as readily.
- Q34
A company builds Node.js services in AWS CodeBuild. Builds currently install dependencies straight from the public npm registry, and a recent typosquatting incident prompted a policy that builds must resolve packages through an approved internal endpoint, that every public package ever pulled must be retained for reproducibility, and that internal shared libraries must be published and consumed through the same endpoint.
Which service configuration meets these requirements with the least custom tooling?
- A Copy approved tarballs into an Amazon S3 bucket and set the npm registry configuration in the buildspec to the bucket website endpoint.
- B Create an AWS CodeArtifact domain and repository with an upstream repository that has an external connection to public npm, and point the build npm configuration at the CodeArtifact endpoint. Correct
- C Push every dependency as an image layer to a private Amazon ECR repository and pull it during the install phase.
- D Commit the resolved node_modules directory into the application repository so builds install nothing at all.
Why B
CodeArtifact is the managed package repository for exactly this shape: builds authenticate to one endpoint, an upstream external connection fetches a public package the first time it is requested, and the package is then retained in the domain so later builds resolve it internally and reproducibly, while internal libraries are published to the same repository. An S3 bucket does not implement the npm registry protocol, so an npm client cannot resolve metadata or versions against it. ECR stores container images and OCI artifacts, not npm packages an install step can resolve. Committing node_modules bloats the repository, breaks native modules across platforms, and gives no provenance record at all.
- Q35
A microservices platform on Amazon ECS is instrumented with AWS X-Ray and handles about 9,000 requests per second, so the default sampling rule — one request per second plus five percent of additional requests — captures a tiny fraction of traffic. A rare failure on the POST /checkout path produces roughly 30 errors per hour and is almost never represented in a trace, while tracing all 9,000 requests per second would be prohibitively expensive.
Which configuration gives the team near-complete trace coverage of the checkout path at an acceptable cost?
- A Raise the fixed rate on the default sampling rule to 100 percent so that no request goes untraced.
- B Enable X-Ray active tracing on the Application Load Balancer so that the load balancer samples every request before it reaches the services.
- C Create a CloudWatch Logs metric filter that counts checkout errors and add the resulting metric to the X-Ray service map.
- D Create a custom X-Ray sampling rule with a higher priority than the default rule that matches the checkout service name and the /checkout URL path, with a reservoir of 50 traces per second and a fixed rate of 100 percent, leaving the default rule to handle everything else. Correct
Why D
X-Ray sampling rules are evaluated in priority order and can match on service name, HTTP method, URL path, and host, so a high-priority rule scoped to the checkout path with a generous reservoir and a full fixed rate traces essentially every checkout request while all other traffic continues to fall through to the default rule — targeted coverage without a platform-wide cost increase. Setting the default rule to 100 percent traces all 9,000 requests per second, which is the expense the scenario rules out. An Application Load Balancer does not sample traces; it only injects or forwards a trace header. A metric filter produces a count from log data and cannot add trace segments or nodes to the service map.
- Q36
A healthcare company runs batch workloads on Amazon EC2 instances in private subnets. The instances must read and write objects in the company's own Amazon S3 buckets, must not be able to reach any S3 bucket outside the organization, and must not send that traffic over the internet. A NAT gateway currently provides all outbound access.
Which configuration meets these requirements?
- A Create a gateway VPC endpoint for Amazon S3, add an endpoint policy that allows access only to the organization's bucket ARNs, and route S3 traffic in the private subnets' route tables through the endpoint. Correct
- B Attach a security group to the instances whose egress rules allow traffic only to the com.amazonaws.region.s3 managed prefix list.
- C Add a bucket policy to each of the company's buckets that denies requests unless aws:SourceVpce matches the VPC's endpoint ID.
- D Replace the NAT gateway routes with network ACL rules that permit outbound traffic only to the published Amazon S3 IP address ranges for the Region.
Why A
A gateway endpoint keeps S3 traffic on the AWS network instead of the NAT path, and its endpoint policy decides which buckets that traffic may address, so scoping it to the organization's bucket ARNs blocks exfiltration to an attacker-owned bucket. A security group referencing the S3 prefix list restores private connectivity only alongside an endpoint and cannot distinguish one bucket from another, because every bucket shares the same addresses. A bucket policy with a source endpoint condition protects the company's own buckets from outside callers but says nothing about what the instances may reach, the exfiltration path in question. Network ACL rules built on published IP ranges are brittle and again cannot express bucket identity.
- Q37 Choose 2
An Auto Scaling group of twelve instances behind an Application Load Balancer is managed by AWS CloudFormation. A template change that swaps the AMI in the launch template currently cycles instances so quickly that in-flight requests fail, and a bad AMI has twice been rolled out to the whole group before anyone noticed. The team wants at most two instances out of service at a time and wants CloudFormation to abort the update if a replacement instance does not report itself healthy within fifteen minutes.
Which two additions to the Auto Scaling group resource achieve this?
- A Set MinInstancesInService equal to the desired capacity so that no instance is ever taken out of service during the update.
- B Add an UpdatePolicy with AutoScalingRollingUpdate specifying MaxBatchSize of 2 and MinInstancesInService of 10. Correct
- C In the same AutoScalingRollingUpdate policy, set WaitOnResourceSignals to true with a PauseTime of PT15M and have the instance bootstrap call cfn-signal on success. Correct
- D Add a CreationPolicy with a ResourceSignal count of 12 and a timeout of fifteen minutes.
- E Attach a stack policy that denies Update:Modify on the Auto Scaling group logical resource.
Why B and C
AutoScalingRollingUpdate controls the shape of the rolling replacement, and the batch size of two with ten instances kept in service is the direct expression of the capacity requirement. Turning on WaitOnResourceSignals makes CloudFormation hold each batch until the new instances signal success within the pause time, and a batch that times out fails the update and rolls it back, which is the safety net the team is missing. Setting MinInstancesInService to the full desired capacity is rejected, because it must be lower than the group maximum size for any instance to be replaced. A CreationPolicy applies only when the group is first created and is ignored during updates. A stack policy denial blocks the update rather than making it safe.
- Q38
An Amazon EC2 Auto Scaling group runs worker instances that poll an Amazon SQS queue; a single job can take up to eight minutes and each worker writes detailed job logs to an instance store path before shipping them on a schedule. Scale-in events terminate workers mid-job, so jobs are reprocessed and the last few minutes of logs are lost.
Which change lets in-flight work finish and logs ship before an instance is terminated, with the least change to the worker application?
- A Add an EC2_INSTANCE_TERMINATING lifecycle hook to the Auto Scaling group so the instance pauses in Terminating:Wait, and have an Amazon EventBridge rule invoke automation that stops the worker from taking new jobs, uploads the logs, and then calls CompleteLifecycleAction. Correct
- B Increase the deregistration delay on the target group to 3,600 seconds so that the Auto Scaling group waits before terminating an instance.
- C Enable EC2 termination protection on the worker instances so that a scale-in event cannot terminate them.
- D Set the Auto Scaling group's default cooldown to 900 seconds so that scaling activities are spaced far enough apart for jobs to complete.
Why A
A termination lifecycle hook is the supported way to insert custom work between the scale-in decision and the actual termination: the instance sits in Terminating:Wait for the heartbeat timeout, an EventBridge rule drives the drain-and-upload automation, and CompleteLifecycleAction releases the instance as soon as the work is done. Deregistration delay only governs how long a load balancer keeps draining existing connections, and these workers pull from a queue rather than receiving load balancer traffic, so nothing is deregistered. Termination protection does not apply to Auto Scaling scale-in. Cooldown controls how soon the next scaling activity may start, not what happens to an instance already being terminated.
- Q39
An operations team of nine engineers wants CloudWatch alarms for its production workloads delivered into a Slack channel with the alarm name, state, and a link to the metric, and wants on-call engineers to be able to run read-only diagnostic commands such as describing an Auto Scaling group from inside that channel. The team does not want to run any infrastructure of its own for this.
Which approach meets these requirements with the least operational overhead?
- A Subscribe an AWS Lambda function to the alarm's Amazon SNS topic and have it format the message and post it to a Slack incoming webhook.
- B Add the Slack channel's email address as an email subscription on the alarm's Amazon SNS topic.
- C Create an Amazon EventBridge rule for the alarm state change with an API destination that calls the Slack API using a connection holding the bot token.
- D Configure Amazon Q Developer in chat applications (formerly AWS Chatbot) with the Slack workspace and channel, subscribe the channel configuration to the alarm's Amazon SNS topic, and attach a channel IAM role with a read-only guardrail policy. Correct
Why D
Amazon Q Developer in chat applications (formerly AWS Chatbot) is the managed integration for this: it renders CloudWatch alarm notifications from an SNS topic into a formatted Slack message with links, and its channel IAM role plus channel guardrail policies bound which commands members may run from the channel, which is how read-only diagnostics are made safe. The Lambda and webhook approach delivers the notification but is code the team maintains, and it offers no way to run commands back into the account. An email subscription pointed at a channel address loses the formatting and the links and again supports no commands. An EventBridge API destination calling Slack directly means owning the bot token, the connection, and the message payloads, with the same missing command path.
- Q40
A team runs a suite of 900 JUnit tests inside an AWS CodeBuild project. The tests already emit JUnit XML into a reports directory. Engineering managers want to open a build and see which tests passed, which failed, and how the pass rate has moved over recent builds, without standing up a dashboard or a separate reporting service.
Which change to the CodeBuild project produces this?
- A Copy the XML files to an Amazon S3 bucket at the end of the build and query them with Amazon Athena.
- B Publish a custom Amazon CloudWatch metric for the pass count and the fail count from a script in the post_build phase.
- C Add a reports section to the buildspec that names a report group, lists the JUnit XML files under file paths, and sets the file format to JUNITXML. Correct
- D Parse the XML in the post_build phase and exit with a nonzero status code when any test has failed.
Why C
A reports section in the buildspec tells CodeBuild to ingest the named result files into a report group after the build, and the console then shows per-test outcomes, durations and the pass-rate trend for the group across builds — no extra service and no code. Writing the XML to S3 and querying it with Athena reproduces that view by hand, complete with a table, a schema and a query to maintain. A pair of CloudWatch metrics gives a trend line but throws away every individual test name and failure message. Failing the build on a nonzero exit code is worth doing anyway, but it reports only that something broke, not which test or how the rate is moving.
- Q41
A partner-facing endpoint at /v1/settlement returned HTTP 500 for nine hours over a weekend and nobody noticed. The Application Load Balancer target stayed healthy throughout because its health check path is /health, and because no partner called the endpoint during the outage, the account's ALB 5XX alarm never left INSUFFICIENT_DATA. The team wants to detect the same failure within five minutes even when real traffic is zero.
Which approach detects the failure reliably during periods of no customer traffic?
- A Create a CloudWatch metric alarm on the load balancer's HTTPCode_Target_5XX_Count metric with a threshold of one or more over a five-minute period.
- B Create an Amazon CloudWatch Synthetics canary that calls /v1/settlement every minute, asserts the status code and a field in the response body, and alarm on the canary's SuccessPercent metric. Correct
- C Enable Amazon CloudWatch RUM on the partner web portal so that failures on the settlement path are reported from real sessions.
- D Change the load balancer target group health check path from /health to /v1/settlement so the load balancer exercises the real endpoint.
Why B
A Synthetics canary generates its own traffic on a schedule and can assert far more than a status code, so it turns an unused endpoint into a continuously measured one and produces a SuccessPercent metric that alarms within a couple of intervals regardless of customer activity. An alarm on 5XX counts is defeated by exactly the condition described: with no requests there are no datapoints, so the alarm sits in INSUFFICIENT_DATA and never fires. CloudWatch RUM instruments real browser sessions and is therefore just as blind during a quiet weekend. Repointing the target group health check at the settlement path would mark otherwise healthy targets as unhealthy the moment that code path broke, turning one broken endpoint into a full outage.
- Q42
An auditor asks a company to show, for the next twelve months, every object-level read and write in one Amazon S3 bucket named patient-exports and every invocation of two AWS Lambda functions that handle export requests. The company already has an organization trail capturing management events, and it refuses to pay to log object-level activity for its other 300 buckets.
Which change to the trail produces the required record?
- A Rely on the existing management events in the organization trail, because S3 object API calls and Lambda invocations are management events.
- B Enable Amazon S3 server access logging on the bucket and Amazon CloudWatch Logs on the two functions, and hand the auditor those logs.
- C Add advanced event selectors for data events that match the AWS::S3::Object resource type where the ARN starts with the patient-exports bucket ARN, and the AWS::Lambda::Function resource type where the ARN equals each function ARN. Correct
- D Turn on AWS CloudTrail Insights on the trail so that unusual object access and invocation patterns are recorded alongside the management events.
Why C
Object-level S3 calls and Lambda Invoke calls are data events, which CloudTrail does not log by default and bills separately, so they must be requested explicitly. Advanced event selectors narrow data events by resource ARN, which keeps the cost to one bucket and two functions instead of the whole account. Management events never include GetObject, PutObject, or Invoke, so the existing trail cannot answer the auditor. S3 server access logs are best-effort with no integrity guarantee, and function logs show what the code printed rather than who called it. CloudTrail Insights analyzes call-rate anomalies on top of events already being logged and records no per-object history of its own.
- Q43
A DevOps engineer writes an AWS CloudFormation template that creates an Amazon RDS instance. The master password is already stored in AWS Secrets Manager under the secret name prod/db/credentials as a JSON document with a password key. Security requires that the password never appear in the template, never be passed as a stack parameter, and never be visible in the stack parameter list or in stack events after deployment.
Which template construct meets these requirements?
- A Declare a template parameter with NoEcho set to true and have the deployment script read the secret and pass it in at deploy time.
- B Add Fn::ImportValue to read the password from an output exported by a separate secrets stack.
- C Use the dynamic reference {{resolve:ssm:/prod/db/password:1}} against a SecureString parameter in Parameter Store.
- D Use the dynamic reference {{resolve:secretsmanager:prod/db/credentials:SecretString:password}} directly in the master password property. Correct
Why D
The Secrets Manager dynamic reference is resolved by CloudFormation when the resource is created or updated, and the resolved value is never stored in the template, in the parameter list or in the change set, which is exactly the set of exposures the security requirement names. A NoEcho parameter hides the value in the console but the deployment tooling still handles the plaintext and passes it over the API, so it is present in the caller command history. Stack exports are plaintext by design and are readable by anything in the account, so exporting a password is the worst option here. The plain ssm dynamic reference does not support SecureString parameters, so that reference fails rather than decrypting anything.
- Q44
An Auto Scaling group of Windows instances backs a news site. Each instance takes about eleven minutes to boot, join the domain, and populate a 20 GB local cache before it can serve traffic. Demand spikes are driven by breaking news and arrive within three minutes with no repeating pattern, so target tracking adds capacity long after the spike has passed. Running peak capacity all day was rejected on cost.
Which change lets the group absorb a three-minute spike while keeping steady-state cost low?
- A Replace target tracking with step scaling using larger step adjustments so that more instances are added per alarm breach.
- B Raise the Auto Scaling group's minimum capacity to the observed peak so that enough instances are always running.
- C Configure an Auto Scaling warm pool holding pre-initialized instances in the Stopped state, with an EC2_INSTANCE_LAUNCHING lifecycle hook that completes the domain join and cache population before an instance enters the pool. Correct
- D Enable predictive scaling on the group so that capacity is provisioned ahead of each spike.
Why C
A warm pool keeps instances that have already booted, joined the domain, and warmed their cache in a stopped state, so a scale-out only has to start them — seconds to a couple of minutes instead of eleven — and stopped instances incur storage cost rather than full instance cost, which is what keeps the steady-state bill down. Larger step adjustments change how many instances are requested, not how long each one takes to become useful, so the eleven-minute initialization still dominates. Raising the minimum to peak solves the latency at exactly the cost the business rejected. Predictive scaling forecasts from historical cyclical patterns and has nothing to learn from spikes driven by unpredictable news events.
- Q45 Choose 2
A retailer expects a promotion to quadruple traffic to a Lambda-based API in three weeks. During the last promotion, requests were rejected once the account reached its Regional concurrent-executions quota, and nobody noticed until customers reported errors. The team wants to be warned while there is still headroom and wants the account prepared for the new peak before the promotion starts.
Which two actions should the team take to meet these requirements?
- A Create an Amazon CloudWatch alarm on the function's Throttles metric with a threshold of one, so that the team is paged when throttling begins.
- B Enable the AWS Trusted Advisor service limits checks and review the dashboard weekly in the run-up to the promotion.
- C Use Service Quotas to create a CloudWatch alarm on the concurrent-executions quota that fires when utilization reaches 80 percent of the applied quota value. Correct
- D Submit a quota increase request through Service Quotas ahead of the promotion, and add the increase to a quota request template in AWS Organizations so that new accounts inherit it. Correct
- E Set reserved concurrency on the API's function to the expected peak so that the capacity is guaranteed during the promotion.
Why C and D
Service Quotas publishes usage metrics for supported quotas and can create a CloudWatch alarm against the applied quota value, so an 80 percent threshold warns the team while there is still headroom rather than after requests are rejected. Raising the quota through Service Quotas before the event is the other half, and a quota request template propagates the same value to accounts created later. An alarm on the Throttles metric is by definition too late, because throttling is the customer-visible failure. Trusted Advisor limit checks refresh on their own cadence and require someone to look, the manual step that failed last time. Reserved concurrency carves capacity out of the same account quota rather than adding any.
- Q46
An Amazon ECS service on AWS Fargate runs a desired count of eight tasks behind an Application Load Balancer and uses the rolling update deployment controller. During deployments the team currently sees the number of healthy tasks dip and latency rise. The service must never drop below its full running capacity during a deployment, and the team accepts paying for extra tasks for the few minutes a deployment lasts.
Which deployment configuration values should the team set?
- A Minimum healthy percent 100 and maximum percent 200. Correct
- B Minimum healthy percent 50 and maximum percent 100.
- C Minimum healthy percent 100 and maximum percent 100.
- D Minimum healthy percent 0 and maximum percent 200.
Why A
The minimum healthy percent is the floor the scheduler must keep running, and the maximum percent is the ceiling of running plus pending tasks, so a floor of one hundred with a ceiling of two hundred lets Amazon ECS start replacement tasks alongside all eight existing ones and only drain an old task once a new one is healthy. A floor of fifty allows half the tasks to be stopped first, which is the dip the team is trying to remove. A floor and a ceiling both at one hundred leaves no headroom to launch anything, so a rolling deployment cannot make progress. A floor of zero permits the scheduler to stop every task before starting replacements, which is a full outage.
- Q47
An enterprise runs 60 AWS accounts in an organization in AWS Organizations, with a dedicated tooling account used by the SRE team. Today an engineer assumes a role in each workload account to look at that account's CloudWatch metrics, logs, and X-Ray traces, which makes correlating a cross-account incident slow. Leadership wants a single place to query telemetry without duplicating data or building a custom collection pipeline.
Which approach gives the SRE team a unified view with the least operational overhead?
- A Grant the SRE role cross-account trust in all 60 accounts and document a role-switching runbook for incident response.
- B Create a CloudWatch Logs subscription filter in every account that ships all log events into a central log group in the tooling account.
- C Schedule an AWS Lambda function in the tooling account that calls GetMetricData in each workload account and republishes the results as custom metrics in the tooling account.
- D Configure CloudWatch cross-account observability: designate the tooling account as the monitoring account and link the 60 workload accounts as source accounts through the organization, sharing metrics, logs, and traces. Correct
Why D
CloudWatch cross-account observability is purpose-built for this: source accounts are linked to a monitoring account through the organization, and the monitoring account can then search logs, graph metrics, and view service maps across every linked account in one console, without copying telemetry anywhere or writing code. Cross-account role switching is what the team already does and is the problem being solved. Centralizing every log event with subscription filters duplicates ingestion and storage cost for 60 accounts and still leaves metrics and traces stranded in the source accounts. A scheduled Lambda that re-publishes metrics creates a fragile pipeline to own, doubles custom metric charges, and loses the original resource context.
- Q48
A company is onboarding a third-party monitoring vendor that needs read-only access to CloudWatch metrics and resource metadata in the company's AWS account. The vendor's platform is multi-tenant and runs in the vendor's own AWS account. The company's security team wants no long-lived credentials to leave the account and wants the access to be usable only when the vendor names this specific customer.
Which access configuration meets these requirements?
- A Create an IAM user for the vendor with the ReadOnlyAccess policy, and deliver the access key and secret key through an encrypted channel.
- B Create an IAM role with the ReadOnlyAccess policy whose trust policy allows the vendor's account as principal and requires a sts:ExternalId condition matching the unique identifier the vendor issued for this customer. Correct
- C Create an IAM role with the ReadOnlyAccess policy whose trust policy allows the vendor's account as principal, and share the role ARN with the vendor.
- D Create an IAM user for the vendor, store its access keys in AWS Secrets Manager, and grant the vendor's account cross-account permission to read that secret.
Why B
A cross-account role removes long-lived credentials, and the external ID condition addresses the confused deputy problem that multi-tenant vendors create: without it, any other customer of the vendor could persuade the vendor's platform to assume this company's role, because the role ARN is all that is needed. Requiring the vendor-issued identifier ties an assume-role call to this specific customer relationship. An IAM user hands out static keys the company must rotate and cannot easily revoke. A role that trusts the vendor account with no condition is the confused deputy case itself. Storing user keys in Secrets Manager only moves the same long-lived credentials somewhere else.
- Q49 Choose 2
A security engineering team works from a dedicated member account in an AWS Organizations structure managed by another team. The security team must deploy a detection stack into every account in the Workloads organizational unit, including accounts that will be vended next quarter, and must be able to update it without opening a ticket against the management account. The organization has all features enabled and trusted access for CloudFormation StackSets is configured.
Which two actions are required?
- A Register the security team account as a delegated administrator for CloudFormation StackSets in AWS Organizations. Correct
- B Create the stack set with self-managed permissions and create the execution role in each target account by hand.
- C Create the stack set with service-managed permissions and leave automatic deployment turned off so the team controls each rollout.
- D Create the stack set with service-managed permissions, target the Workloads organizational unit, and enable automatic deployment. Correct
- E Create an AWS Config organization conformance pack in the security account and let it provision the detection stack resources in each account.
Why A and D
StackSets operations from anywhere other than the management account require the account to be registered as a delegated administrator for the service, which is the first half of the requirement. Service-managed permissions are what allow an organizational unit to be used as a target and are the prerequisite for automatic deployment, which puts the stack into accounts that join that unit later. Self-managed permissions cannot target an organizational unit and force an execution role to be created in every account, including future ones. Service-managed permissions with automatic deployment disabled misses new accounts. A conformance pack deploys Config rules and remediation configurations, not an arbitrary detection stack.
- Q50 Choose 2
An Amazon EC2 consumer fleet reads from an Amazon SQS standard queue named invoice-render. Individual messages take up to four minutes to process, the queue's visibility timeout is still the default 30 seconds, and the message retention period is four days. Operators report that downstream invoices are being generated two or three times, and that a handful of malformed messages have been retried continuously for days.
Which two changes together stop the duplicate processing and get the malformed messages off the queue? (Select TWO.)
- A Raise the queue's visibility timeout to at least six minutes so that a message is not made visible again while a consumer is still working on it. Correct
- B Convert the queue to a FIFO queue so that a failing message blocks its message group until processing succeeds.
- C Configure a redrive policy on the queue that points at a dead-letter queue with a maxReceiveCount of five, so messages that keep failing are moved off the main queue. Correct
- D Reduce the message retention period to one hour so that malformed messages age out of the queue quickly.
- E Enable long polling by setting ReceiveMessageWaitTimeSeconds to 20 on the queue.
Why A and C
The duplicates come from a visibility timeout shorter than the processing time: at 30 seconds the message becomes visible again while the first consumer is still rendering it, so a second consumer picks it up, and raising the timeout past the worst-case duration ends that. The perpetual retries need a redrive policy, which moves a message to a dead-letter queue once the receive count exceeds the configured maximum, isolating poison messages for inspection. A FIFO queue shortens nothing and would let one malformed message stall an entire message group. Cutting retention to an hour discards legitimate backlog along with the bad messages. Long polling reduces empty receives and request cost, and does not affect redelivery or poison messages.
- Q51
Amazon GuardDuty raises a high-severity CryptoCurrency:EC2/BitcoinTool.B!DNS finding for an Amazon EC2 instance that serves production traffic behind an Application Load Balancer. The security team wants the instance isolated from the network and its disks preserved for a forensic investigation within a minute of the finding, with no effect on the other instances in the same subnet.
Which automated response meets these requirements?
- A Create an Amazon EventBridge rule matching the aws.guardduty source, the finding type, and a severity of 7 or higher, and target an AWS Systems Manager Automation runbook that deregisters the instance from the target group, replaces its security groups with an isolation group that allows no traffic, and snapshots its EBS volumes. Correct
- B Create an Amazon EventBridge rule matching the finding and target an AWS Lambda function that calls TerminateInstances on the affected instance.
- C Enable GuardDuty automatic remediation for cryptocurrency findings so that GuardDuty quarantines the instance itself.
- D Create an Amazon EventBridge rule matching the finding and target an AWS Lambda function that replaces the subnet's network ACL with one that denies all inbound and outbound traffic.
Why A
Containment here has three parts, and an Automation runbook driven by an EventBridge rule on the GuardDuty finding performs all of them in one documented, repeatable step: removing the instance from the target group stops customer traffic, an isolation security group with no rules cuts the network path, and EBS snapshots preserve the disks for the investigation. Terminating the instance contains the threat but destroys the evidence the team was asked to keep. GuardDuty has no remediation capability of its own; it produces findings and leaves the response to EventBridge targets. Replacing the subnet's network ACL isolates every instance in that subnet, not just the compromised one, so it converts a contained incident into a wider outage.
- Q52
A V2 AWS CodePipeline pipeline has a source action named Source and a build action named Build. The build needs the full commit ID of the revision being built so it can tag a container image, and the release engineers also want to set an environment label such as canary or standard when they start a release, without editing the pipeline definition.
Which configuration passes both values into the build action?
- A Have the source action write the commit ID to an AWS Systems Manager parameter and have the build action read both values from Parameter Store.
- B Declare a pipeline-level variable for the environment label and set the build action environment variables to #{variables.EnvLabel} and #{SourceVariables.CommitId}. Correct
- C Set the image tag from the CODEBUILD_RESOLVED_SOURCE_VERSION environment variable inside the buildspec and hardcode the environment label in the buildspec.
- D Reference $CODEPIPELINE_COMMIT_ID and $CODEPIPELINE_ENVIRONMENT in the buildspec, which CodePipeline injects into every downstream action.
Why B
Every CodePipeline action publishes output variables under a namespace, and a source action exposes CommitId there, so a later action can reference it with the namespaced syntax in its own configuration. Pipeline-level variables are a V2 feature whose values are supplied when a release is started and are referenced the same way, which covers the label without a pipeline edit. Writing the commit ID to Parameter Store adds a component and races between concurrent executions. The CodeBuild resolved source version does give the commit but leaves the label hardcoded, so the second requirement fails. The two invented CodePipeline environment variables do not exist and nothing would be injected.
- Q53
A security engineering team needs to run ad hoc SQL over three years of AWS CloudTrail management events and Amazon S3 data events from 40 accounts in an organization, and must retain that data for seven years. Today the organization trail writes to a central Amazon S3 bucket and every investigation starts by hand-writing partition definitions before Amazon Athena can read the prefix layout.
Which approach gives the team queryable history across all accounts with the least infrastructure to build and maintain?
- A Create an organization CloudTrail Lake event data store with a seven-year retention period that ingests management and data events from all accounts, and run SQL queries directly against the event data store. Correct
- B Keep delivering to Amazon S3 and build an AWS Glue crawler plus an Athena table with partition projection over the trail prefixes.
- C Enable CloudTrail Insights on the organization trail so that the team can query the resulting findings.
- D Create an Amazon EventBridge rule that forwards CloudTrail events to an Amazon OpenSearch Service domain, and have analysts query the domain.
Why A
CloudTrail Lake is a managed, immutable event data store with its own SQL query engine and a retention period configurable up to seven years or more, and an organization-level store collects events from every member account without any per-account wiring — there is no table, crawler, or partition scheme to own. The Glue-and-Athena route works and is cheaper per query, but it is precisely the partitioning and cataloging maintenance the team is trying to escape. CloudTrail Insights only surfaces anomalies in API call rates and error rates; it is not a general query facility. Forwarding through EventBridge sees management events as they occur but not three years of history, and it adds an OpenSearch cluster to size, secure, and pay for.
- Q54
A company with 400 Amazon S3 buckets spread over 18 accounts discovered that an engineer had made a bucket world-readable with an object ACL. The security team wants a guarantee that no bucket in any member account can be made public, while a partner still needs to read objects under the reports/2026/ prefix of one bucket.
Which combination of controls meets these requirements?
- A Turn on the four block public access settings on each existing bucket, and give the partner a set of presigned URLs regenerated nightly by an AWS Lambda function.
- B Create an AWS Config rule that detects public buckets and notifies the security team so that the setting can be corrected when it drifts.
- C Attach a service control policy that denies s3:PutBucketAcl in the member accounts, and give the partner an IAM user with a policy scoped to the prefix.
- D Turn on account-level block public access in every member account and attach a service control policy that denies s3:PutAccountPublicAccessBlock, and give the partner access through an S3 access point whose policy is scoped to the reports/2026/ prefix. Correct
Why D
Account-level block public access applies to every existing and future bucket in the account, and denying the API that changes it through a service control policy is what turns the setting into a guarantee rather than a default someone can undo. An access point with its own policy then carries the partner's prefix-scoped access without reopening the bucket policy. Bucket-level settings alone leave every newly created bucket to be configured again. A Config rule is detective: it reports the exposure after it exists rather than preventing it. Denying only the bucket ACL API leaves bucket policies and object ACLs as open paths to a public object, and a partner IAM user means issuing long-lived credentials the company must rotate.
- Q55
A governance team wants AWS CloudFormation templates rejected inside the pipeline whenever they declare an Amazon S3 bucket without default encryption or a security group that opens TCP 22 to 0.0.0.0/0. The check must run before any stack is created, must be expressed as reusable written rules the governance team owns, and must fail the pipeline so the change never reaches an account.
Which implementation meets these requirements?
- A Create AWS Config managed rules for both conditions in every account and alert the governance team when a resource is marked noncompliant.
- B Add a CodeBuild action that runs cfn-lint over the templates and fails the build on any finding it reports.
- C Add a CodeBuild action before the deploy stage that runs AWS CloudFormation Guard against a rules file held by the governance team, exiting nonzero on any violation. Correct
- D Attach a stack policy to each target stack that denies updates which would create unencrypted buckets or open security groups.
Why C
CloudFormation Guard evaluates a template against declarative rules written in its own policy language, so the governance team can express both conditions as rules, keep them in a repository, and fail a build action on any violation before a stack is touched. AWS Config rules evaluate resources that already exist, which is detection after the fact rather than prevention in the pipeline. cfn-lint validates templates against the resource specification and catches malformed properties and bad references, but it does not express organization-specific policy such as a required encryption block. A stack policy governs which existing logical resources may be changed by an update and cannot inspect resource properties at all.
- Q56
A latency-sensitive AWS Lambda function written in Java takes about 2.5 seconds to initialize a new execution environment. Traffic arrives in a sharp burst at the top of every hour, which drives p99 latency well past the team's 800 ms objective. The same function calls a partner API that is contractually limited to 200 concurrent requests, so the function must never run more than 200 invocations at once.
Which configuration meets the latency objective and enforces the concurrency ceiling?
- A Set a reserved concurrency of 200 on the function, which both caps concurrency at 200 and keeps 200 execution environments initialized and ready.
- B Configure provisioned concurrency of 150 on the function's published alias with an Application Auto Scaling scheduled action that raises it just before each hourly peak, and set the function's reserved concurrency to 200. Correct
- C Configure provisioned concurrency of 150 on the $LATEST version of the function and leave the account's unreserved concurrency available to absorb the rest of the burst.
- D Create an Amazon EventBridge rule that invokes the function with a warm-up payload every minute so that execution environments stay initialized between bursts.
Why B
Provisioned concurrency keeps initialized environments ready so bursts hit warm code, Application Auto Scaling scheduled actions raise it just before the predictable hourly peak and lower it afterwards to control cost, and reserved concurrency is a separate setting that caps the function at 200 — the two solve different halves of the requirement. Reserved concurrency alone only sets a limit and pre-initializes nothing, so every burst still pays the 2.5-second cold start. Provisioned concurrency cannot be configured on $LATEST at all — it requires a published version or an alias — and that option also leaves the partner limit unenforced. Scheduled warm-up invocations keep one or two environments alive, nowhere near 150.
- Q57
During a production incident, responders need an interactive shell on Amazon EC2 instances that sit in private subnets with no route to the internet. Company policy forbids inbound port 22 from any source, forbids bastion hosts, and forbids long-lived SSH keys, and the compliance team requires that every command typed during an incident be retained for review.
Which access method satisfies the policy?
- A Launch a hardened bastion host in a public subnet, rotate its host keys weekly, and allow SSH from the bastion to the private instances.
- B Use EC2 Instance Connect to push a short-lived public key to the instance for each session, so that no key is stored permanently.
- C Use AWS Systems Manager Session Manager with an instance profile granting the managed SSM policy, interface VPC endpoints for ssm, ssmmessages, and ec2messages, and session logging to Amazon S3 and Amazon CloudWatch Logs. Correct
- D Connect responders to the VPC over AWS Client VPN and store the shared SSH private key in AWS Secrets Manager, granting responders read access during incidents.
Why C
Session Manager reaches the instance through an outbound connection the SSM Agent makes, so no inbound port and no bastion are needed, and the three interface endpoints keep that connection inside the VPC for instances with no internet route. Access is granted through IAM rather than keys, and session logging to S3 and CloudWatch Logs produces the command record the compliance team requires. A bastion is forbidden outright by the policy. EC2 Instance Connect still speaks SSH on port 22 and therefore needs inbound access to the instance, and it produces no keystroke record. Client VPN plus a shared private key reintroduces exactly the long-lived key the policy bans and again logs nothing about what was typed.
- Q58
A company deploys an Amazon ECS service with AWS CodeDeploy using the blue/green deployment type. The service has a production listener and a separate test listener on the Application Load Balancer. Before production traffic moves, the team wants an automated contract test to call the replacement task set through the test listener, and the deployment must roll back automatically when that test fails.
Which lifecycle event hook should invoke the AWS Lambda function that runs the contract test?
- A AfterAllowTraffic
- B ApplicationStart
- C BeforeInstall
- D AfterAllowTestTraffic Correct
Why D
In an ECS blue/green deployment the replacement task set becomes reachable on the test listener partway through, and the hook that fires at that point is the one whose Lambda function is meant to validate the new task set; returning a failed status from it stops the deployment and rolls back before any production traffic shifts. The hook that runs after production traffic has already moved is too late to protect customers. ApplicationStart belongs to EC2 and on-premises deployments driven by an AppSpec script section, not to ECS. The hook that runs before installation fires before the replacement task set exists, so there is nothing for the contract test to call.
- Q59 Choose 2
An application team reports that a Network Load Balancer cannot reach an Amazon EC2 instance in a private subnet on TCP port 8443. Two engineers disagree about whether the packets are reaching the instance's elastic network interface at all, or whether a security group or network ACL is dropping them. The team must produce evidence within the hour and is not permitted to install software on the instance or restart it.
Which two actions together produce that evidence? (Select TWO.)
- A Create a VPC flow log on the instance's elastic network interface that captures ALL traffic and delivers records to an Amazon CloudWatch Logs log group. Correct
- B Enable Amazon S3 server access logging on the bucket that the application writes to, and correlate the request timestamps.
- C Enable AWS CloudTrail data events for the instance's attached Amazon EBS volumes so that the network calls are recorded.
- D Turn on AWS Config recording for the instance's security group so that the current inbound rules are captured as a configuration item.
- E Query the flow log group with CloudWatch Logs Insights, filtering on a destination port of 8443 and grouping by the action field to compare ACCEPT and REJECT records. Correct
Why A and E
A VPC flow log at the network interface level records the IP traffic metadata that settles the argument — source, destination, port, protocol, packet and byte counts, and an action of ACCEPT or REJECT — and it is enabled entirely from the VPC console with no agent and no restart. Logs Insights then turns those records into the actual answer, because grouping by action on destination port 8443 distinguishes packets that never arrived from packets that arrived and were rejected by a security group or network ACL. S3 server access logging describes bucket requests, not TCP traffic to an instance. CloudTrail data events for EBS are not a way to observe network flow. AWS Config captures configured rules, not dropped packets.
- Q60 Choose 2
A company builds container images in AWS CodePipeline, pushes them to Amazon ECR, and deploys them to Amazon ECS. Two requirements have been added: an image with a critical vulnerability must never reach the production deployment stage, and running EC2 instances, Lambda functions, and images already sitting in ECR must be re-evaluated whenever a new CVE is published.
Which two actions should the DevOps engineer take to meet these requirements with the least operational overhead?
- A Enable Amazon Inspector from a delegated administrator for the organization with Amazon ECR, Amazon EC2, and AWS Lambda scanning activated, so that workloads and stored images are rescanned as new CVEs are published. Correct
- B Enable Amazon ECR basic scanning on the repository so that every image is scanned when it is pushed.
- C Add a scheduled AWS Lambda function that runs a third-party scanner against the running tasks each week and emails the results to the platform team.
- D Add a pipeline stage between build and deploy that reads the Amazon Inspector findings for the pushed image digest and fails the stage when a finding of CRITICAL severity exists. Correct
- E Enable the relevant AWS Security Hub controls so that Security Hub scans the images in Amazon ECR and blocks deployment of vulnerable ones.
Why A and D
Amazon Inspector is the continuous scanner: activated for the organization, it covers ECR images, EC2 instances, and Lambda functions, and it re-evaluates existing resources when new vulnerabilities are published rather than only at push time. The gate is a separate job, so a pipeline stage that queries the findings for the exact image digest and fails on a critical severity is what actually stops the deployment. ECR basic scanning runs only on push, covers operating system packages, and does not rescan as new CVEs appear. A weekly third-party scan is code and schedule the team owns and leaves a six-day window. Security Hub aggregates and normalizes findings from scanners such as Inspector but performs no scanning and blocks no deployment.
- Q61
A hosting company must publish a hardened Amazon Linux 2023 AMI every month. The image needs a build step that installs an agent and applies a CIS hardening script, an automated test step that must pass before the image is released, and distribution of the finished AMI to six member accounts across three Regions. The platform team of two engineers wants to own as little of this machinery as possible.
Which approach meets these requirements with the least operational overhead?
- A Create an EC2 Image Builder image pipeline with a build component, test components, a distribution configuration listing the three Regions and the six target accounts, and a monthly schedule. Correct
- B Create a CodePipeline pipeline that runs a Packer template in AWS CodeBuild, then runs a test harness, then calls CopyImage and ModifyImageAttribute for each Region and account.
- C Write an AWS Systems Manager Automation runbook that launches an instance, runs the hardening script through Run Command, creates an image, and is invoked by an Amazon EventBridge schedule.
- D Have an engineer launch an instance monthly, apply the hardening script interactively, create an image from the instance, and share it from the console.
Why A
EC2 Image Builder is the managed image pipeline service, and each requirement maps to one of its parts: build components install and harden, test components gate the release of the image, a distribution configuration copies the finished AMI into named Regions and shares it with named accounts, and the pipeline schedule runs the whole thing monthly. A Packer pipeline reproduces all of that but leaves the team owning a template, a build project, a test harness and the copy and share calls. A Systems Manager Automation runbook can build an image but has no test gate or distribution model, so both would be hand-written. Doing it interactively every month is unrepeatable and produces no record of what was applied.
- Q62
A game backend serves a latency-sensitive API from Application Load Balancers in three Regions, published through Amazon Route 53 latency-based routing records with a 60-second TTL. During a recent Regional impairment, a measurable share of players kept connecting to the impaired Region for over half an hour because their networks cached DNS answers past the TTL. Several enterprise customers also need a small, stable set of IP addresses to allow-list in their firewalls.
Which change addresses both the slow failover and the allow-listing requirement with the least client-side change?
- A Lower the TTL on the latency records to 10 seconds and publish the load balancer DNS names to the enterprise customers for allow-listing.
- B Place an Amazon CloudFront distribution with an origin group in front of the three Regions, and ask customers to allow-list the CloudFront address ranges published in the AWS IP ranges file.
- C Create an AWS Global Accelerator standard accelerator with the three load balancers as endpoints in Regional endpoint groups, and publish the accelerator's two static anycast IP addresses to the customers. Correct
- D Replace latency-based routing with Route 53 failover routing backed by health checks on each Regional load balancer.
Why C
Global Accelerator gives clients two static anycast IP addresses that never change, satisfying the allow-listing requirement, and it makes failover a network-layer decision rather than a DNS one: when an endpoint group's health checks fail, traffic is withdrawn and rerouted over the AWS backbone within seconds, so a client that caches DNS forever still lands on a healthy Region. Lowering the TTL does not help clients that already ignore it, and load balancer DNS names resolve to changing addresses. CloudFront is optimized for HTTP caching, its origin failover covers only specific request methods and status codes, and its published address ranges are large and change. Failover routing is still DNS and inherits the same caching problem.
- Q63
After migrating a data lake into 900 Amazon S3 buckets, a company cannot say whether payment card numbers or national identification numbers landed in the buckets under the analytics-raw prefix. The compliance team wants a repeatable monthly inventory of which buckets hold those data types, including an internal employee identifier that follows the pattern EMP followed by eight digits, with results visible alongside the company's other security findings.
Which approach meets these requirements with the least custom code?
- A Create an AWS Glue crawler over the buckets and run scheduled Amazon Athena queries with regular expressions that look for card and identifier formats.
- B Enable Amazon GuardDuty S3 protection so that access to buckets containing sensitive data is reported as findings.
- C Enable Amazon Inspector with Amazon S3 scanning so that objects are evaluated against the managed rules package each month.
- D Enable Amazon Macie for the organization from a delegated administrator, and run a monthly sensitive data discovery job scoped to those buckets that uses the managed data identifiers together with a custom data identifier for the employee pattern. Correct
Why D
Macie is the managed sensitive data discovery service: it inventories buckets, scans objects on a schedule, ships managed data identifiers for card numbers and national identifiers, accepts a custom data identifier for a house-specific pattern such as the employee format, and publishes findings that Security Hub picks up. The Glue and Athena approach sees only data that can be crawled into a table, misses everything unstructured, and makes the compliance team own a library of regular expressions. GuardDuty S3 protection analyzes API activity for anomalous access and never inspects object content. Amazon Inspector scans instances, images, and functions for software vulnerabilities and performs no data classification.
- Q64
A team keeps its application in a GitHub repository connected to AWS CodePipeline through AWS CodeConnections, and the pipeline is the V2 type. Reviewers want a build and unit test run for every pull request that targets the main branch, refreshed whenever the author pushes another commit to the pull request. Plain pushes to feature branches should start nothing, and pull requests that only touch files under docs must not start a run.
Which trigger configuration matches this?
- A A push trigger with a branch filter that includes feature/* and excludes main.
- B A pull request trigger with the opened and updated events, a branch filter that includes main, and a file path filter that excludes docs/**. Correct
- C A push trigger with a branch filter that includes main, combined with a manual approval action at the head of the pipeline.
- D No trigger at all, with the source action left on periodic change detection so the pipeline polls the repository every few minutes.
Why B
A V2 pipeline trigger can be built on pull request events rather than pushes, and the event list distinguishes a pull request being opened from one being updated with a new commit, which together give the refresh behavior reviewers asked for. The branch filter on a pull request trigger matches the destination branch, so scoping it to main ignores pull requests aimed elsewhere, and the file path exclusion suppresses documentation-only changes. A push trigger on feature branches starts runs for exactly the pushes that should start nothing. A push trigger on main fires after a merge rather than before review. Periodic change detection polls the branch and knows nothing about pull requests.
- Q65 Choose 2
A payments service writes lines such as ERROR PaymentDeclinedGatewayTimeout into the CloudWatch Logs log group /aws/ecs/payments-prod. Operations wants to be alerted when more than 20 of those lines appear in any five-minute window, and wants each alert to open a tracked work item on the team's queue in AWS Systems Manager OpsCenter automatically, without writing or maintaining any custom code.
Which two configurations together meet the requirement? (Select TWO.)
- A Save a CloudWatch Logs Insights query that counts the matching lines, and schedule it to run every five minutes so that it raises an alert when the count exceeds 20.
- B Create a metric filter on the log group that matches the error pattern and publishes a count to a custom metric, then create a metric alarm on that metric with a threshold of 20 over a five-minute period and treat missing data as not breaching. Correct
- C Create a subscription filter that delivers the matching lines to an Amazon Data Firehose stream so that the count can be evaluated from the objects written to Amazon S3.
- D Add a Systems Manager OpsCenter action to the alarm so that the transition into ALARM creates an OpsItem, alongside any Amazon SNS notification action. Correct
- E Enable CloudWatch Container Insights on the ECS cluster so that the error count is collected automatically as a built-in performance metric.
Why B and D
A metric filter is what turns a text pattern in a log group into a numeric CloudWatch metric, and a metric alarm on that metric expresses the threshold of 20 in five minutes; treating missing data as not breaching keeps the alarm quiet during periods with no matching lines. CloudWatch alarms support a Systems Manager OpsCenter action, so entering ALARM can create an OpsItem directly, which is the no-code half of the requirement. Logs Insights saved queries run on demand and cannot be scheduled to raise alerts. A subscription filter into Firehose moves the raw lines to S3 but leaves counting and alerting to something else. Container Insights collects CPU, memory, and task-level performance metrics, not application error strings.
- Q66
A platform team wants each application team's lead to create IAM roles for their own workloads in a shared account without waiting on a ticket. Every role a lead creates must be incapable of exceeding a baseline managed policy named AppBaseline, and no lead may weaken that baseline or create a role that can. The platform team's own automation must keep its existing broader permissions in the same account.
Which approach meets these requirements?
- A Attach AppBaseline as a managed policy to every role the leads create, and review new roles weekly to confirm that no additional inline policies were attached.
- B Grant the leads permission to call iam:CreateRole and iam:PutRolePolicy only when the iam:PermissionsBoundary condition key matches the AppBaseline policy ARN, and deny them any action that modifies or deletes that policy. Correct
- C Attach a service control policy to the organizational unit containing the shared account that allows only the actions in AppBaseline.
- D Create an IAM group whose permissions are AppBaseline, add the leads to the group, and have them create roles from the group's console session.
Why B
A permissions boundary caps the effective permissions of a principal, and the iam:PermissionsBoundary condition key lets the platform team require that any role a lead creates carries the AppBaseline boundary, while denying changes to the policy itself closes the obvious bypass. Because the constraint sits in the leads' own policies, the platform team's automation is untouched. Attaching AppBaseline as a plain managed policy sets a floor rather than a ceiling, since a lead can add an inline policy that grants more, and the weekly review finds that only afterward. A service control policy applies to every principal in the account, so it would clamp the platform automation too. IAM groups apply only to users and have no effect on roles.
- Q67 Choose 2
A company patches Amazon EC2 instances with AWS Systems Manager Patch Manager. Development instances must receive operating system patches as soon as they are released, and production instances must receive the same patches only after they have been available for seven days. The two groups also patch inside different maintenance windows. Operations wants patch compliance reported by Patch Manager rather than assembled by hand.
Which two actions implement this split?
- A Create one custom patch baseline with a seven-day auto-approval delay and register it for all instances, relying on maintenance window timing to give development earlier patches.
- B Create two custom patch baselines for the operating system, one with an auto-approval delay of zero days and one with an auto-approval delay of seven days, and register each with its own patch group. Correct
- C Use the AWS predefined default patch baseline for both environments and vary only the maintenance window schedules.
- D Replace Patch Manager with a State Manager association that runs the package manager upgrade command on a schedule in each environment.
- E Tag the instances with a Patch Group tag whose value matches the patch group registered on the intended baseline, and run each group from its own maintenance window. Correct
Why B and E
Which patches are approved is decided by a baseline approval rule, and how long after release they are approved is the auto-approval delay, so two baselines with different delays is the only way to express the two policies. A baseline reaches instances through a patch group, and an instance joins one by carrying the Patch Group tag key with the matching value, after which each group patches in its own window and reports compliance. A single baseline with a seven-day delay withholds patches from development whenever the window runs, because a window controls timing rather than approval. The predefined baseline has one delay for everyone. A package upgrade run from State Manager abandons baselines and patch compliance data.
- Q68
A company terminates TLS on Application Load Balancers. The internet-facing certificate was purchased from a third-party CA and imported into AWS Certificate Manager, and it expired unnoticed last year during a holiday weekend. Internal load balancers use self-signed certificates that an engineer replaces by hand each year. The company controls its public DNS zone in Amazon Route 53.
Which approach removes the manual renewal work for both tiers?
- A Keep importing the third-party certificate and create an Amazon EventBridge rule on the ACM certificate approaching expiration event that opens a ticket 45 days ahead.
- B Request a public ACM certificate validated by email for the internet-facing load balancer, and continue issuing self-signed certificates for the internal load balancers with a longer validity period.
- C Request a public ACM certificate validated by DNS and leave the validation CNAME record in the Route 53 zone, and issue certificates for the internal load balancers from ACM backed by a private CA in AWS Private CA. Correct
- D Run certbot on a scheduled AWS Lambda function that obtains certificates from a free public CA and imports them into ACM for both tiers.
Why C
ACM renews the certificates it issues, and it does so without human action only when the validation method keeps proving domain ownership on its own, which is what leaving the DNS validation CNAME in the Route 53 zone provides; the load balancer then picks up the renewed certificate with no change. Private certificates issued through ACM from a private CA are managed the same way, retiring the annual self-signed replacement. Imported certificates are never renewed by ACM, so the expiration event produces only a better-timed ticket for the same manual work. Email validation asks a human to act on renewal mail, the step that failed over a holiday. The certbot job is custom infrastructure reimplementing what ACM already does.
- Q69
A pipeline builds a container image, pushes it to an Amazon ECR repository, and then updates an Amazon ECS service in the following stage. Security requires that a deployment be stopped automatically whenever the freshly pushed image carries a vulnerability finding of critical severity, and wants the finding data to include operating system and language package vulnerabilities rather than operating system packages alone.
Which approach meets these requirements?
- A Enable basic scanning on the repository with scan on push, and have the very next pipeline action read the results immediately after the push action reports success.
- B Add an ECR lifecycle policy rule that expires any image whose scan findings include a critical severity vulnerability.
- C Enable Amazon Inspector enhanced scanning for the registry and insert a Lambda invoke action that waits for the scan to complete, calls DescribeImageScanFindings, and fails the action when a critical finding is present. Correct
- D Configure the ECS task definition to reference only images carrying the tag scanned, so unscanned images can never be deployed.
Why C
Enhanced scanning is the ECR mode backed by Amazon Inspector and is the one that covers language package vulnerabilities alongside operating system packages, which the requirement names explicitly. Scanning is asynchronous, so the gate has to be an action that waits for completion, reads the findings, and fails the stage on a critical severity, which stops the pipeline before the deploy stage runs. Basic scanning covers operating system packages only, and reading results the instant the push succeeds usually finds the scan still running. Lifecycle policy rules select images by tag pattern, age or count, and cannot reference scan findings. A tag convention blocks nothing unless something applies the tag, and nothing here does.
- Q70
A team has been deploying an AWS CDK application into a single account and Region for a year. A new deployment into a freshly created account in eu-central-1 fails during cdk deploy with an error that the environment has no bootstrap stack and that a version parameter cannot be found. The application uses Docker image assets, and the deployment will eventually be driven by a pipeline running in a separate tooling account.
Which action resolves the failure and prepares the account for the pipeline?
- A Run cdk synth with staging disabled so the application no longer produces assets that require a staging location.
- B Create a CloudFormation stack in the new account containing an Amazon S3 bucket named after the account and Region, and re-run the deployment.
- C Grant the deploying principal the AdministratorAccess managed policy in the new account, since the error is a permissions failure in disguise.
- D Run cdk bootstrap for the account and Region with a trust option naming the tooling account, which creates the toolkit stack with the asset bucket, the asset repository, the deployment roles and the version parameter. Correct
Why D
The CDK stores assets and the roles it assumes during deployment in a per-environment toolkit stack, and the missing version parameter is the marker the toolkit uses to detect that the environment was never bootstrapped. Bootstrapping the account and Region creates the staging bucket, the asset repository for Docker images, the deployment roles and the version parameter, and the trust option authorizes the tooling account to assume those roles later. Disabling staging does not remove the need for a repository to hold image assets. Hand-building a bucket produces none of the roles or the version parameter that the toolkit looks for. The failure is a missing stack rather than a missing permission, so broad administrator rights change nothing.
- Q71
A company runs one AWS CodePipeline pipeline in us-east-1 that must deploy the same CloudFormation template and the same build artifact to us-east-1, eu-west-1 and ap-southeast-2. The pipeline already builds the artifact once in us-east-1. The deploys to the other two Regions fail before the stack operation starts, reporting that the input artifact could not be retrieved.
Which change lets the single pipeline deploy into all three Regions?
- A Configure a cross-Region deploy action for each Region and define an artifact store for every Region the pipeline deploys into, so CodePipeline replicates the artifact into each Regional bucket. Correct
- B Create one pipeline per Region, each with its own source action on the same repository and branch.
- C Enable cross-Region replication on the us-east-1 artifact bucket and point the two remote deploy actions at the replica buckets.
- D Leave one deploy action in place and set the target Region inside the template by overriding the AWS::Region pseudo parameter per deployment.
Why A
A CodePipeline action that runs in a Region other than the pipeline Region needs an artifact bucket in that Region, declared in the pipeline artifact stores, and CodePipeline then copies the input artifact there before the action runs — the failure described is exactly the missing Regional store. Three separate pipelines work but triple the definitions to keep in step and lose the single release view, and they rebuild the artifact rather than promoting one. Bucket replication does not register a Regional artifact store, so the action still has nowhere to read from. AWS::Region is a read-only pseudo parameter that reports where the stack is being created and cannot be set to redirect a deployment.
- Q72
A regulated company with 60 accounts in AWS Organizations must evaluate every account against the same set of 40 AWS Config rules with matching remediation configurations, must be able to add a rule once and have it reach all accounts, and wants a single compliance score per account for the whole set rather than 40 separate rule results to reconcile.
Which approach meets these requirements with the least ongoing effort?
- A Deploy a CloudFormation stack in each account containing 40 individual Config rule resources, and update every stack when a rule is added.
- B Deploy an organization conformance pack from the management account or a delegated administrator account, targeting all accounts, and edit the pack template when a rule is added. Correct
- C Enable an AWS Security Hub standard in every account and rely on its controls to cover the 40 rules.
- D Write service control policies that block the actions the 40 rules are meant to detect.
Why B
A conformance pack is a packaged collection of Config rules and remediation actions deployed as a unit, and the organization form of it fans out from the management account or a delegated administrator to every member account, reporting compliance at the pack level as well as per rule — both the single-edit requirement and the single score follow directly. Sixty stacks of individual rules deliver the same evaluations but leave the team updating sixty stacks and aggregating the results by hand. A Security Hub standard has a fixed control set that cannot be replaced by an arbitrary list of 40 rules. Service control policies prevent actions rather than evaluate configuration, and they produce no compliance record at all.
- Q73
A company sources AWS CodePipeline from GitHub using a personal access token that belongs to an engineer who has just given notice. The platform team wants an integration owned by the GitHub organization rather than by an individual, with no credential stored in AWS by the team, and with the webhook that starts the pipeline created and maintained by AWS rather than by hand.
Which source configuration should the team move to?
- A Create a fine-grained personal access token owned by a shared machine user, store it in AWS Secrets Manager, and reference it from the source action.
- B Replace the source action with an Amazon S3 source and add a GitHub Actions workflow that uploads a zipped source bundle on each push.
- C Create an AWS CodeConnections connection to GitHub, complete the handshake by installing the AWS connector app on the GitHub organization, and grant the pipeline role permission to use the connection. Correct
- D Mirror the GitHub repository into AWS CodeCommit on a schedule and point the source action at the mirror.
Why C
A CodeConnections connection starts in a pending state and is completed through a one-time browser handshake that installs the AWS connector application on the GitHub organization, so the trust is owned by the organization, no token is stored in AWS, and the connection manages repository event delivery for the pipeline. A machine-user token is still a long-lived secret that somebody has to rotate and that a repository administrator can revoke by accident. An S3 source plus an uploader workflow works but discards commit metadata and adds a bundle-publishing step to maintain. A scheduled mirror into another repository service introduces a second copy of the truth and a delay between push and pipeline start.
- Q74 Choose 2
A serverless API is defined in an AWS SAM template with fourteen AWS::Serverless::Function resources behind Amazon API Gateway. Releases must expose each new function version to ten percent of invocations for five minutes before the rest of the traffic moves, and must roll back automatically if a CloudWatch alarm on function errors fires during the shift. The team wants this expressed in the template rather than in deployment scripts.
Which two template settings are required on each function?
- A AutoPublishAlias set to an alias name such as live, so SAM publishes a new function version and moves that alias on every deployment. Correct
- B DeploymentPreference with its type set to AllAtOnce.
- C DeploymentPreference with its type set to Canary10Percent5Minutes and an Alarms list naming the CloudWatch error alarm. Correct
- D ProvisionedConcurrencyConfig on the function so that new versions are warm before traffic arrives.
- E An API Gateway canary release deployment on the stage that routes ten percent of requests to the new deployment.
Why A and C
SAM implements gradual deployment by handing a function alias to AWS CodeDeploy, and the alias only exists when AutoPublishAlias is set — without it the deployment preference has nothing to shift and the setting is ignored. The deployment preference itself supplies the canary shape and the alarm list that CodeDeploy watches, and a breaching alarm during the shift reverts the alias to the previous version. The all-at-once type moves everything in one step and gives the alarm no window. Provisioned concurrency changes cold-start behavior and plays no part in traffic shifting. An API Gateway canary stage splits only HTTP traffic through that stage and offers no automatic rollback of the function version.
- Q75
A company promotes a single build through development, staging and production environments. Auditors require that the exact artifact tested in staging be the artifact deployed to production, with no rebuild, and that a named release manager record an approval before the production deployment begins. The approval request must reach the release managers by email with a link to the staging test report.
Which pipeline design meets these requirements?
- A Add a CodeBuild action at the start of the production stage that rebuilds the application from the same commit hash before deploying.
- B Add a Lambda invoke action at the start of the production stage that polls an Amazon DynamoDB table until an operator writes an approval record.
- C Create three pipelines, one per environment, each triggered by the success of the previous pipeline and each building from the same commit.
- D Add a manual approval action at the start of the production stage with an Amazon SNS topic for notification and a review URL pointing at the staging test report, and pass the build stage output artifact into every deploy action. Correct
Why D
A manual approval action halts the stage until an authorized principal approves or rejects, publishes the request to the configured SNS topic so subscribers receive it by email, and carries a review URL, while the approver identity and comment are recorded in the execution history for the auditors. Passing the build stage output artifact into all three deploy actions is what guarantees that the bits deployed to production are the bits staging tested. Rebuilding from the same commit produces a different artifact from a different toolchain state, which is what the auditors forbade. A DynamoDB polling function reinvents approval with no audit identity. Three pipelines that each rebuild break artifact identity as well.
Ready to try it without the answers in front of you?