Question 1 of 25
0% complete
Review your answers
0 of 25 correct
-
Question 1
Correct IncorrectWhich Amazon EventBridge event pattern should the DevOps engineer use?
{ "source": ["aws.codepipeline"], "detail-type": ["CodePipeline Pipeline Execution State Change"], "detail": { "state": ["FAILED"] } } Correct answer Your answer{ "source": ["aws.codepipeline"], "detail-type": ["CodePipeline Stage Execution State Change"], "detail": { "state": ["FAILED"], "pipeline": ["prod-encoder"] } } Correct answer Your answer{ "source": ["aws.codepipeline"], "detail-type": ["CodePipeline Action Execution State Change"], "detail": { "state": ["FAILED"], "pipeline": ["prod-encoder"] } } Correct answer Your answer{ "source": ["aws.codebuild"], "detail-type": ["CodeBuild Build State Change"], "detail": { "build-status": ["FAILED"], "project-name": ["prod-encoder"] } } Correct answer Your answerExplanation
CodePipeline emits three distinct event granularities — pipeline, stage, and action. The requirement is a stage-level failure for one named pipeline, so the pattern must combine the "CodePipeline Stage Execution State Change" detail-type with both a FAILED state and a pipeline filter. The pipeline-execution pattern is the wrong granularity and, because it omits the pipeline field, it would also match failures from every other pipeline in the account. The action-execution pattern fires once per failing action, which is exactly the retry-level noise the team wants to avoid. The CodeBuild pattern only observes the build project and would stay silent when the Test or Deploy stage fails.
-
Question 2
Correct IncorrectWhich statement about CodeDeploy automatic rollback is correct?
Automatic rollback can be configured to trigger when a deployment fails or when a specified Amazon CloudWatch alarm enters the ALARM state. Correct answer Your answerAutomatic rollback is available only for in-place deployments to EC2 instances; on-premises instances and blue/green deployments must be rolled back manually. Correct answer Your answerAutomatic rollback is driven by the deployment group’s Amazon SNS triggers — CodeDeploy rolls back whenever a subscriber fails to acknowledge the notification. Correct answer Your answerCodeDeploy has no automatic rollback capability; the team must redeploy the previous revision from the console or the AWS CLI. Correct answer Your answerExplanation
A CodeDeploy deployment group can roll back automatically on deployment failure, when a specified CloudWatch alarm threshold is met, or when a deployment is stopped — the first two are the checkboxes exposed in the console. Wiring a 5xx-rate alarm into the deployment group covers exactly the case described here, where the deployment itself succeeds but the service degrades afterwards. The claim that rollback is limited to in-place EC2 deployments is wrong — on-premises instances and blue/green deployments support it as well. SNS triggers are notification-only and have no acknowledgement semantics that could drive a rollback. And the option asserting that no automatic rollback exists contradicts the advanced settings on every deployment group.
-
Question 3
Correct IncorrectWhich command belongs in the pre_build phase?
docker build -t $REPOSITORY_URI:$IMAGE_TAG -f docker/Dockerfile.production . Correct answer Your answeraws ecr get-login-password | docker login --username AWS --password-stdin $REGISTRY_URI Correct answer Your answerdocker tag $REPOSITORY_URI:$IMAGE_TAG $REGISTRY_URI/$REPOSITORY_NAME:latest Correct answer Your answerdocker push $REPOSITORY_URI:$IMAGE_TAG && docker push $REPOSITORY_URI:latest Correct answer Your answerExplanation
The pre_build phase is for preparation that the build itself depends on — authenticating to the registry, resolving the repository URI, and computing the image tag. Retrieving an ECR authorization token and piping it into docker login is the canonical pre_build step. Building the image is the work of the build phase, and tagging it can only happen after the image exists, so it belongs to build as well. Pushing the image must wait until the build has produced and tagged it, which places it in post_build.
-
Question 4
Correct IncorrectWhich implementation meets these requirements with the least effort?
Run a Jenkins server on Amazon EC2 with a job that polls the ECR repository and shifts traffic between two ECS services by calling the AWS CLI. Correct answer Your answerBuild an AWS CodePipeline pipeline with an Amazon ECR source stage, an AWS CodeBuild stage that rebuilds the image, and an AWS CloudFormation deploy stage that replaces the ECS service. Correct answer Your answerBuild a CodePipeline pipeline with an Amazon ECR source stage and an Amazon ECS (Blue/Green) deploy action backed by an AWS CodeDeploy deployment group. Correct answer Your answerCreate an AWS CodeDeploy application and deployment group that watches the ECR repository directly and deploys each new image to the ECS cluster. Correct answer Your answerExplanation
CodePipeline has a native ECR source action and a native Amazon ECS (Blue/Green) deploy action that delegates the traffic shift to CodeDeploy, giving you the validation window and automatic rollback without custom work. Amazon ECS has since added its own built-in blue/green deployment strategy that does not involve CodeDeploy at all, and it is now the simpler starting point for greenfield services — but of the four approaches offered here, the CodeDeploy-backed pipeline action is the one that meets the requirement. Adding a CodeBuild stage to rebuild an image that already exists is wasted work, and driving the ECS service through CloudFormation gives up the managed blue/green traffic shifting. CodeDeploy alone cannot form a pipeline — it has no source stage and will not react to an ECR push on its own. Self-managing Jenkins and hand-rolling the traffic shift is the most operational overhead of the four, not the least.
-
Question 5
Correct IncorrectHow should the DevOps engineer restructure the pipeline?
Change the action mode to "Create or replace a change set", add a manual approval, then execute the change set in a later action. Correct answer Your answerKeep the existing action mode and attach a stack policy that denies updates to the production database resources in the stack. Correct answer Your answerChange the action mode to "Delete a stack" and add a later stage that recreates the stack from the new template. Correct answer Your answerReplace the CloudFormation deploy action with an AWS CodeDeploy action so that failed updates roll back automatically. Correct answer Your answerExplanation
A change set is CloudFormation’s preview mechanism: the CHANGE_SET_REPLACE action mode computes the diff without touching resources, a manual approval action pauses the pipeline for a human to read it, and a second action with the CHANGE_SET_EXECUTE mode applies it once approved. A stack policy can block specific updates but shows nobody what a deployment intends to do, so it prevents rather than reveals. Deleting and recreating the stack destroys data and causes a long outage. CodeDeploy deploys application revisions to compute targets and cannot manage CloudFormation stacks at all.
-
Question 6
Correct IncorrectWhich approach meets these requirements?
Enable rolling updates on the existing environment and set a pause time long enough for the application to start on each batch. Correct answer Your answerDeploy the new version to a second Elastic Beanstalk environment, verify it, then swap the environment CNAMEs. Correct answer Your answerEnable immutable updates on the existing environment so that a fresh Auto Scaling group is launched for every deployment. Correct answer Your answerDeploy the new version to a second environment and configure the original environment to return an HTTP 301 redirect to the new environment’s URL. Correct answer Your answerExplanation
Swapping environment CNAMEs is Elastic Beanstalk’s blue/green pattern. The new version is fully warmed and validated in its own environment before any customer reaches it, and rolling back is simply a second swap, which takes effect as soon as DNS resolves again. Rolling updates and immutable updates both replace instances inside the live environment, so recovering from a bad release means deploying the old version again rather than flipping a switch. Redirecting the old environment with a 301 changes the URL customers see and browsers cache permanent redirects aggressively, which makes the rollback unreliable.
-
Question 7
Correct IncorrectWhat should the DevOps engineer configure?
An Amazon EventBridge scheduled rule that invokes an AWS Lambda function to call delete-application-version each night. Correct answer Your answerAn application version lifecycle policy that removes versions by age or by count, optionally deleting their source bundles. Correct answer Your answerAn AWS Config rule that flags applications exceeding the version limit and notifies the team through Amazon SNS. Correct answer Your answerAn Amazon S3 lifecycle rule on the Elastic Beanstalk bucket that expires source bundles after 30 days. Correct answer Your answerExplanation
Elastic Beanstalk has a purpose-built application version lifecycle policy that deletes versions once they exceed a maximum count or age. Deleting the source bundle from S3 is a separate opt-in setting on that policy — by default Beanstalk leaves the bundle in place to avoid data loss. The policy is native, requires no code, and never removes a version that is currently deployed to an environment or to one terminated within the last ten weeks. A scheduled Lambda function achieves a similar result but adds code, permissions, and failure modes for something the platform already does. An AWS Config rule only reports on the condition and would still leave the team to clean up by hand. An S3 lifecycle rule deletes the bundle objects but leaves the application version records in place, so the version limit is still reached.
-
Question 8
Correct IncorrectWhich CloudFormation capability produces that report?
Drift detection, which compares live resources against their template configuration. Correct answer Your answerChange sets, which compute the effect of a proposed template update. Correct answer Your answerStack policies, which control the resources an update is allowed to change. Correct answer Your answerRollback triggers, which monitor CloudWatch alarms while a stack update is in progress. Correct answer Your answerExplanation
Drift detection is the feature for out-of-band changes that already happened: it inspects each supported resource, compares it with the properties CloudFormation expects, and reports each one as IN_SYNC or MODIFIED with the exact property differences. That is precisely the console-edit scenario described. A change set looks forward rather than backward, previewing what a proposed update would do to a stack that is assumed to be in its expected state. A stack policy is a guardrail that permits or denies updates and reports nothing. Rollback triggers watch CloudWatch alarms during an in-progress update and can abort it, which does not help once the update has long finished.
-
Question 9
Correct IncorrectHow should the DevOps engineer guarantee the ordering?
Move the database resource above the application server resource in the Resources section, since CloudFormation creates resources in document order. Correct answer Your answerNest the database resource inside the application server resource so that it is created as a child. Correct answer Your answerAdd a Wait Condition with a timeout longer than the database creation time and no other configuration. Correct answer Your answerAdd a DependsOn attribute to the application server resource that names the database resource. Correct answer Your answerExplanation
DependsOn is the explicit ordering mechanism — CloudFormation will not begin creating the application server until the database has reached CREATE_COMPLETE. Position in the template is irrelevant because CloudFormation parallelizes creation and derives ordering only from references and DependsOn, so reordering the Resources section changes nothing. CloudFormation resources are flat; there is no parent-child nesting of one resource inside another. A bare WaitCondition with a long timeout only makes the stack sit and wait — without a signal from the application it eventually fails, and it still does not sequence the two resources.
-
Question 10
Correct IncorrectWhich two actions together ensure the stack reports CREATE_COMPLETE only after the software is confirmed running? (Select TWO.)
Attach a stack policy stating that all resources must be running before the status changes. Correct answer Your answerAdd an Auto Scaling lifecycle hook to mark the instance configuration as complete. Correct answer Your answerAttach a CreationPolicy to the EC2 instance resource with a ResourceSignal timeout. Correct answer Your answerSet DeletionPolicy to Retain on the EC2 instance so that a failed configuration is preserved. Correct answer Your answerCall cfn-signal at the end of the bootstrap script to report success or failure back to CloudFormation. Correct answer Your answerExplanation
A CreationPolicy with a ResourceSignal tells CloudFormation to hold the resource in CREATE_IN_PROGRESS until it receives the expected number of success signals or the timeout expires, and the cfn-signal helper script sends that signal from the end of the bootstrap. The two work only as a pair — the policy without the signal times out, and the signal without the policy is discarded. A stack policy governs which resources an update may change and has no bearing on creation status. Auto Scaling lifecycle hooks apply to instances launched by an Auto Scaling group, not to a standalone instance resource. A DeletionPolicy only controls what happens when a resource is removed.
-
Question 11
Correct IncorrectWhich two endpoints can the ServiceToken property reference? (Select TWO.)
An Amazon SNS topic ARN Correct answer Your answerAn Amazon SQS queue ARN Correct answer Your answerAn Amazon EventBridge rule ARN Correct answer Your answerAn AWS Step Functions state machine name Correct answer Your answerAn AWS Lambda function ARN Correct answer Your answerExplanation
CloudFormation custom resources support exactly two provider types: an SNS topic, which fans the request out to whatever is subscribed, and a Lambda function, which is by far the more common choice. Both are supplied as ARNs. An SQS queue, an EventBridge rule, and a Step Functions state machine are not valid ServiceToken targets. The failure is not a template validation error — ServiceToken is typed as a plain string, so the template parses and the stack operation fails later, when CloudFormation cannot deliver the request to the target and the custom resource times out. A state machine name rather than an ARN would be invalid regardless, since ServiceToken always takes an ARN.
-
Question 12
Correct IncorrectWhat is the minimal change that masks the value in those places?
Add a Hidden attribute to the parameter definition. Correct answer Your answerSet the Metadata attribute of the stack to mark the parameter as sensitive. Correct answer Your answerSet the NoEcho attribute to true on the parameter. Correct answer Your answerAdd a Password property to the resource that consumes the parameter. Correct answer Your answerExplanation
NoEcho is the parameter attribute built for this: when it is true, CloudFormation returns the value as a row of asterisks in the console, in describe-stacks responses, and in stack events. There is no Hidden parameter attribute and no generic Password resource property in CloudFormation — both would fail template validation. The stack Metadata section is free-form documentation that CloudFormation never interprets, so marking a parameter sensitive there changes nothing. NoEcho masks display only; for real secret management, reference AWS Secrets Manager with a dynamic reference so the value never enters the template at all.
-
Question 13
Correct IncorrectWhich design meets these requirements?
Route the alarm to an Amazon SNS topic that pages the on-call engineer to run the steps by hand. Correct answer Your answerSchedule a cron job on every instance that truncates the logs each hour regardless of disk state. Correct answer Your answerRoute the alarm to an AWS Lambda function that opens an SSH session to the instance and runs the commands. Correct answer Your answerRoute the alarm to an Amazon EventBridge rule that starts a Systems Manager Automation runbook on the instance. Correct answer Your answerExplanation
Systems Manager Automation is the managed runbook engine, and EventBridge is what turns an alarm state change into an invocation. Systems Manager reaches the instance through the SSM Agent rather than an inbound port, so no SSH ingress is needed, and every execution is recorded with its steps, parameters, and output. Paging a human meets the audit requirement but not the automation one, and it is slow at three in the morning. An hourly cron job ignores the alarm entirely, so it either runs when nothing is wrong or waits up to an hour when something is. Having Lambda open an SSH session reintroduces the inbound access the requirement rules out and means managing keys and network paths by hand.
-
Question 14
Correct IncorrectWhich combination of Route 53 routing policies supports all three patterns?
Latency for blue/green, Simple for canary, Weighted for disaster recovery Correct answer Your answerSimple for blue/green, Weighted for canary, Latency for disaster recovery Correct answer Your answerWeighted for blue/green, Weighted for canary, Failover for disaster recovery Correct answer Your answerWeighted for blue/green, Latency for canary, Failover for disaster recovery Correct answer Your answerExplanation
Weighted routing covers both release patterns: a blue/green cutover is a weighted record set flipped from 100/0 to 0/100, and a canary is the same mechanism moved in small increments. Failover routing is the policy designed for active-passive disaster recovery, promoting the standby record only when the primary’s health check fails. Latency routing sends users to the Region with the best response time, which the operator cannot control, making it unsuitable for a deliberate release cutover. Simple routing offers no traffic split at all, so it cannot express a canary.
-
Question 15
Correct IncorrectWhich two questions should the engineer answer first in order to choose an appropriate DR strategy? (Select TWO.)
Which EC2 instance types should the recovery environment use? Correct answer Your answerWhat are the recovery time objective and the recovery point objective for the workload? Correct answer Your answerWhat budget is available for the disaster recovery environment? Correct answer Your answerWhich database engine should the recovery environment run? Correct answer Your answerWhich load balancer type should the recovery environment use? Correct answer Your answerExplanation
RTO and RPO define how quickly the business must be serving traffic again and how much data it can afford to lose; those two numbers are what separate backup and restore from pilot light, warm standby, and multi-site active-active. Budget is the other primary input, because each step up that ladder costs materially more to keep running. Instance types, database engine, and load balancer type are downstream implementation details that follow from the strategy — and in most designs they simply mirror what production already uses, so answering them first tells the engineer nothing about which strategy to pick.
-
Question 16
Correct IncorrectWhich action addresses the concern most directly?
Enable server-side encryption with AWS KMS on the trail’s S3 bucket. Correct answer Your answerReconfigure the trail in the CloudTrail console to deliver to a second S3 bucket in another Region. Correct answer Your answerEnable S3 Cross-Region Replication on the trail’s bucket so objects are copied to a bucket in another Region. Correct answer Your answerWrite an AWS Lambda function that reads the trail’s bucket on a schedule and copies new log files to a bucket in another Region. Correct answer Your answerExplanation
S3 Cross-Region Replication copies each log file to a bucket in another Region automatically as it is delivered, which keeps the audit history readable if the original Region becomes unavailable. Encrypting the bucket with KMS protects confidentiality but does nothing for availability. A CloudTrail trail delivers to exactly one S3 bucket, so there is no second destination to configure in the console. A scheduled Lambda copier could work but reimplements a native S3 feature, adds code and IAM permissions to maintain, and leaves a replication gap between runs.
-
Question 17
Correct IncorrectHow should the DevOps engineer implement this?
Create a CloudWatch alarm that publishes to an Amazon SQS queue, and have the queue remove an instance from the group. Correct answer Your answerCreate a CloudWatch alarm that notifies the Application Load Balancer so that it deregisters and terminates an instance. Correct answer Your answerCreate a CloudWatch alarm that notifies the operations team through Amazon SNS so that an engineer can terminate an instance. Correct answer Your answerCreate a CloudWatch alarm on the group’s aggregated CPU and attach it to a scaling policy that decreases desired capacity. Correct answer Your answerExplanation
Scaling in is driven by a CloudWatch alarm on the group’s aggregated metric wired to an Auto Scaling scaling policy, which lowers desired capacity and lets the group terminate an instance according to its termination policy. A complete design also needs a matching scale-out policy, since a scale-in policy alone would shrink the group and never grow it back. An SQS queue is a message buffer and cannot act on an Auto Scaling group. The load balancer routes and health-checks traffic; it never changes group capacity. Paging a human works but is manual, slow, and not the automation the requirement asks for.
-
Question 18
Correct IncorrectWhich two actions should the DevOps engineer take? (Select TWO.)
Record vCPU consumption in an Amazon DynamoDB table that a pipeline step reads and writes on each launch. Correct answer Your answerRun the application on EC2 Dedicated Hosts so that the workload is bound to identifiable physical servers. Correct answer Your answerPurchase Reserved Instances and associate Elastic IP addresses with them so that the instances remain on the same hardware. Correct answer Your answerCreate a license configuration in AWS License Manager with the appropriate license type and rules, and query consumption with list-usage-for-license-configuration. Correct answer Your answerCreate an AWS Config rule that counts running EC2 instances and compares the total against the license limit. Correct answer Your answerExplanation
Dedicated Hosts expose the underlying physical server, including its sockets and cores, which is what a socket- or core-bound license needs. License Manager is the service purpose-built for the reporting half: a license configuration encodes the entitlement and its rules, it tracks consumption as instances launch, and a CLI call returns current usage that a pipeline step can gate on. The two services are formally coupled — AWS requires Dedicated Hosts when the counting type is Cores or Sockets. Maintaining a DynamoDB ledger reimplements that tracking by hand and drifts the moment an instance is launched outside the pipeline. Reserved Instances are a billing construct and Elastic IPs are network addresses — neither pins a workload to particular hardware. An AWS Config rule counting instances misses the point when the license is measured in sockets or cores rather than instance count.
-
Question 19
Correct IncorrectWhat should the DevOps engineer implement to diagnose the errors quickly?
Ship the error logs to Amazon CloudWatch Logs with the CloudWatch agent, then search them with Logs Insights and metric filters. Correct answer Your answerInstall the CloudWatch agent to ship the error logs to Amazon CloudWatch Logs, then export them to a third-party graphing tool for analysis. Correct answer Your answerConfigure the application to send every error directly to an AWS Lambda function for processing. Correct answer Your answerConfigure the application to send every error to AWS Config so that the errors are recorded with the resource configuration history. Correct answer Your answerExplanation
Centralizing the logs in CloudWatch Logs solves the disappearing-instance problem, and metric filters plus Logs Insights let the team search across the whole fleet and turn recurring error patterns into metrics and alarms without leaving AWS. Forwarding those same logs to an external tool adds a dependency and cost for capability CloudWatch already provides. Invoking a Lambda function per error builds a custom log pipeline with no search interface and no retention story. AWS Config records resource configuration changes and has no concept of application logs at all.
-
Question 20
Correct IncorrectWhat is the most likely explanation?
The engineer lacks the IAM permissions required to read load balancer logs. Correct answer Your answerAccess logging is disabled by default and must be enabled on the load balancer. Correct answer Your answerThe Auto Scaling group is not forwarding the required log data to the load balancer. Correct answer Your answerThe EC2 instances are not forwarding the required log data to the load balancer. Correct answer Your answerExplanation
Elastic Load Balancing access logging is optional and off by default. Until it is enabled and pointed at a bucket with a policy that lets the service write to it, no objects are ever delivered — which matches the completely empty bucket. Missing IAM permissions would produce an access denied error rather than an empty listing. The remaining two options describe a data flow that does not exist: the load balancer writes access logs from its own observation of the connections it handles, so neither the Auto Scaling group nor the registered instances send it anything to log.
-
Question 21
Correct IncorrectHow can this be achieved with Amazon CloudWatch?
Create a separate CloudWatch dashboard in each Region and open them side by side. Correct answer Your answerRegister the instances running in the other Regions with CloudWatch in the primary Region. Correct answer Your answerCreate a single CloudWatch dashboard with widgets that reference metrics from each Region. Correct answer Your answerThis is not possible; CloudWatch metrics can only be visualized within the Region that produced them. Correct answer Your answerExplanation
A CloudWatch dashboard widget can source its metrics from any Region, so one dashboard can present all five side by side and give on-call a single pane of glass. Building one dashboard per Region is the manual workaround the requirement is explicitly trying to eliminate. There is no mechanism for registering an instance with CloudWatch in a different Region — metrics are published to the Region the resource runs in. And the claim that cross-Region visualization is impossible is simply false; only the storage of metrics is Regional, not their display.
-
Question 22
Correct IncorrectHow should the engineer use the service to find and fix the bottlenecks?
Enable CodeGuru Profiler anomaly detection so that it automatically rolls back the deployment when CPU utilization spikes. Correct answer Your answerEnable heap utilization visualization in CodeGuru Profiler to perform real-time memory allocation analysis and locate memory leaks. Correct answer Your answerUse Amazon CodeGuru Reviewer to analyze the application at runtime and generate suggestions for optimizing CPU and memory usage. Correct answer Your answerRun the CodeGuru Profiler agent in the application and use its flame graphs and recommendations to find the methods consuming the most CPU. Correct answer Your answerExplanation
CodeGuru Profiler works by running a low-overhead agent inside the live application, aggregating stack traces, and presenting them as a flame graph in which the widest frames are the methods burning the most CPU — alongside recommendations that often translate directly into smaller instances. Profiler can surface anomalies in latency and CPU profiles, but it does not perform deployments and therefore cannot roll one back. Heap analysis is a genuine Profiler feature, but memory is not the reported symptom here; CPU spikes and latency are. CodeGuru Reviewer is a static analysis tool for source code and pull requests and never observes a running process.
-
Question 23
Correct IncorrectWhich two methods achieve this? (Select TWO.)
Revert the launch template to the previous AMI ID so that the group stops launching the new instances. Correct answer Your answerDisable the Elastic Load Balancing health check type on the Auto Scaling group. Correct answer Your answerPut the instance into the Standby state to remove it temporarily from the Auto Scaling group. Correct answer Your answerAdd an EC2_INSTANCE_LAUNCHING lifecycle hook and keep recording the lifecycle action heartbeat so the instance remains in the Pending:Wait state. Correct answer Your answerDecrease the desired capacity of the Auto Scaling group. Correct answer Your answerExplanation
Standby is the direct answer: Amazon EC2 Auto Scaling does not run health checks on an instance in a standby state, and the instance is deregistered from the target group while it keeps running and stays reachable over SSH or Systems Manager. A launching lifecycle hook is the other route, because it holds a new instance in Pending:Wait before it is ever health-checked. Note the timeout arithmetic: the hook’s heartbeat timeout accepts 30 to 7200 seconds and defaults to 3600, so 24 hours cannot be set on the parameter directly — you reach it by calling RecordLifecycleActionHeartbeat to reset the clock, bounded by a global wait-state limit of 48 hours or 100 times the heartbeat timeout, whichever is smaller. Reverting the AMI removes the very instances the engineer wants to examine. Switching the group’s health check type away from ELB would stop the terminations, but it blinds the group to unhealthy instances fleet-wide, which the requirement rules out. Lowering desired capacity gives no control over which instance is terminated.
-
Question 24
Correct IncorrectWhat is the quickest way to obtain that information?
Open each OU in the AWS Organizations console and read the service last accessed information shown there. Correct answer Your answerCall the AWS Config service through the AWS CLI to retrieve service last accessed information for each organizational unit. Correct answer Your answerAdd a resource group in AWS Resource Groups for the candidate services and view the last accessed information for the group. Correct answer Your answerUse IAM access advisor to view service last accessed data for each organizational unit. Correct answer Your answerExplanation
Service last accessed data is produced by IAM access advisor, and it can be generated for an organizational unit or the whole organization from the management account, which is precisely the scoping input the operator needs. The AWS Organizations console manages accounts, OUs, and policies; it does not display access advisor data. AWS Config records resource configuration state and compliance, not which principals called which services. Resource Groups collects and tags resources for bulk operations and reports nothing about service usage history.
-
Question 25
Correct IncorrectWhich approach meets these requirements?
Attach an API Gateway resource policy allowing the corporate IP ranges and the two AWS accounts, denying everything else. Correct answer Your answerAttach IAM policies to users and roles in the two accounts, and put AWS WAF in front of the API for additional protection. Correct answer Your answerEnable API Gateway caching to improve performance and use AWS CloudTrail to monitor and audit access requests. Correct answer Your answerAttach an API Gateway resource policy that allows the corporate source IP ranges from any AWS account. Correct answer Your answerExplanation
An API Gateway resource policy is a policy attached to the API itself and can express both required conditions in one document — an aws:SourceIp condition for the office ranges and an AWS account or role principal for the two permitted accounts. The account half only takes effect when the methods use IAM authorization, since a request must be SigV4-signed for API Gateway to know which account it came from. IAM policies alone govern what identities in those accounts may do and cannot restrict by source IP at the API, and adding AWS WAF brings request filtering but not the account-level restriction. Caching is a performance feature and CloudTrail is an audit trail; neither blocks a request. A resource policy that allows the office ranges from any AWS account enforces only half the requirement, since any AWS account could then call the API from an office address.