Topic 08 Practice Test 2 covers FM APIs, Streaming, Async Processing, Resilience, Rate Limits, Routing, and Developer Tools in Domain 2 (Tasks 2.4-2.5). For broader exam preparation, review the AIP-C01 Exam Dumps. Every option includes focused technical reasoning tied to the tested decision.
Question 1
A platform team maintains its REST API contract in source control and wants API Gateway resources created from that versioned interface definition. Which approach best supports this API-first workflow? Choose ONE.
- OpenAPI definition import
- API Gateway mapping template
- AWS Amplify declarative UI components
- API Gateway body request validation
Correct Answer: A
Correct Answer
Answer A is correct because an OpenAPI definition imported into API Gateway provides the needed implementation because it defines paths, methods, schemas, and API Gateway extensions in an importable interface specification. The scenario’s deciding constraint is to deploy the API from a portable version-controlled interface specification; this capability meets that constraint at the correct architectural point.
Incorrect Answers
Answer B is incorrect because an API Gateway request mapping template focuses on a different layer: it transforms an incoming API payload into the shape required by the backend integration. That is a strong match when legacy clients cannot change their external request contract. The question instead requires a mechanism to deploy the API from a portable version-controlled interface specification, so this is not the best answer.
Answer C is incorrect because AWS Amplify declarative UI components provides a useful but different function by letting the system provide reusable declarative front-end components and managed web application integration. It fits situations where the product needs a GenAI interface quickly. The scenario’s determining requirement is to deploy the API from a portable version-controlled interface specification, so this option is not sufficient.
Answer D is incorrect because The role of API Gateway request validator with a JSON Schema model is to validate the request body against a configured JSON Schema before API Gateway invokes the backend. That helps when bad request bodies must be rejected at ingress. The present constraint is to deploy the API from a portable version-controlled interface specification, making this a neighboring capability rather than the right choice.
Question 2
An API Gateway REST API already contains manually maintained resources that are not present in a new OpenAPI file. The team must apply additions from the file without deliberately replacing the whole API definition. Which import approach should it use? Choose ONE.
- API Gateway mapping template
- OpenAPI import in merge mode
- OpenAPI definition import
- API Gateway body request validation
Correct Answer: B
Correct Answer
Answer B is correct because OpenAPI import with merge mode provides the needed implementation because it merges an updated OpenAPI definition into an existing API Gateway REST API. The scenario’s deciding constraint is to merge the OpenAPI update into the existing REST API; this capability meets that constraint at the correct architectural point.
Incorrect Answers
Answer A is incorrect because Consider an API Gateway request mapping template for cases where the system should transform an incoming API payload into the shape required by the backend integration, especially when legacy clients cannot change their external request contract. The stated requirement is different because the team needs to merge the OpenAPI update into the existing REST API; this feature would not achieve it.
Answer C is incorrect because an OpenAPI definition imported into API Gateway can define paths, methods, schemas, and API Gateway extensions in an importable interface specification. That is valuable when teams need one version-controlled API contract. It does not meet the current need to merge the OpenAPI update into the existing REST API, so selecting it would leave the core requirement unsatisfied.
Answer D is incorrect because With API Gateway request validator with a JSON Schema model, the architecture can validate the request body against a configured JSON Schema before API Gateway invokes the backend. That is appropriate if bad request bodies must be rejected at ingress. Here the team must merge the OpenAPI update into the existing REST API; therefore this feature would not resolve the scenario’s deciding constraint.
Question 3
A partner API needs a target allowance of 50,000 calls per API key each month. The requirement is a time-based consumer quota rather than only a short-term request-rate limit. Which API Gateway feature is the best match? Choose ONE.
- API Gateway stage or method throttling
- Bedrock CountTokens
- Bedrock per-request metadata
- API Gateway usage plan quota
Correct Answer: D
Correct Answer
Answer D is correct because an API Gateway usage plan with API keys and per-client quotas fits because it associates API keys with per-client target rates and best-effort time-based quota targets. The requirement is to apply a per-client time-based target request quota. This option provides that behavior directly; the alternatives target different parts of the integration stack.
Incorrect Answers
Answer A is incorrect because API Gateway stage or method throttling would apply rate and burst targets to an API stage or method. Its strongest fit is where one endpoint needs service-level request-rate protection. The question asks for a way to apply a per-client time-based target request quota, which calls for a different control.
Answer B is incorrect because the Amazon Bedrock CountTokens operation serves another architectural need because it can return the model-specific token count for an InvokeModel or Converse input before inference. It is appropriate when the application must measure tokens before submission. The tested scenario needs the team to apply a per-client time-based target request quota, which this option does not deliver.
Answer C is incorrect because Amazon Bedrock per-request metadata with model invocation logging lets an implementation record caller-supplied key-value tags with each supported Bedrock invocation when logging is enabled. Its value appears when attribution dimensions vary on every call. In this scenario the missing capability must apply a per-client time-based target request quota; this option leaves that requirement untouched.
Question 4
The `/generate` method must begin throttling above a defined steady request rate and burst target so that all callers together do not overwhelm the integration. Which control should the team configure? Choose ONE.
- Bedrock CountTokens
- API Gateway mapping template
- API Gateway stage or method throttling
- API Gateway usage plan quota
Correct Answer: C
Correct Answer
Answer C is correct because API Gateway stage or method throttling is appropriate because it applies rate and burst targets to an API stage or method. That enables the team to protect one API method with shared rate and burst targets. Another option would leave the tested requirement unresolved or place the control elsewhere.
Incorrect Answers
Answer A is incorrect because the Amazon Bedrock CountTokens operation focuses on a different layer: it returns the model-specific token count for an InvokeModel or Converse input before inference. That is a strong match when the application must measure tokens before submission. The question instead requires a mechanism to protect one API method with shared rate and burst targets, so this is not the best answer.
Answer B is incorrect because an API Gateway request mapping template provides a useful but different function by letting the system transforms an incoming API payload into the shape required by the backend integration. It fits situations where legacy clients cannot change their external request contract. The scenario’s determining requirement is to protect one API method with shared rate and burst targets, so this option is not sufficient.
Answer D is incorrect because Choose an API Gateway usage plan with API keys and per-client quotas when the goal is to associate API keys with per-client target rates and time-based quotas. It belongs in cases where partners need separate request allowances. This case instead asks how to protect one API method with shared rate and burst targets, so another AWS capability is required.
Question 5
X-Ray active tracing is already enabled on an API Gateway REST stage, but the team needs to collect a larger representative sample for a high-priority traffic class without tracing every request. What should be adjusted? Choose ONE.
- AWS X-Ray sampling rule
- Bedrock per-request metadata
- CloudWatch Logs Insights
- API Gateway stage or method throttling
Correct Answer: A
Correct Answer
Answer A is correct because Use an AWS X-Ray sampling rule. It controls which API Gateway REST requests X-Ray records and at what sampling rate, matching the need to tune the percentage and criteria of requests recorded as traces. The other choices are useful for adjacent concerns but do not provide this specific control.
Incorrect Answers
Answer B is incorrect because Amazon Bedrock per-request metadata with model invocation logging can record caller-supplied key-value tags with each supported Bedrock invocation when logging is enabled. That is valuable when attribution dimensions vary on every call. It does not meet the current need to tune the percentage and criteria of requests recorded as traces, so selecting it would leave the core requirement unsatisfied.
Answer C is incorrect because With CloudWatch Logs Insights over model invocation logs, the architecture can query and aggregates captured CloudWatch log fields across many invocation records. That is appropriate if operations must find recurring production patterns. Here the team must tune the percentage and criteria of requests recorded as traces; therefore this feature would not resolve the scenario’s deciding constraint.
Answer D is incorrect because Consider API Gateway stage or method throttling for cases where the system should apply rate and burst targets to an API stage or method, especially when one endpoint needs service-level request-rate protection. The stated requirement is different because the team needs to tune the percentage and criteria of requests recorded as traces; this feature would not achieve it.
Question 6
Before deciding whether to submit a prompt, an application must know the exact model-specific input token count that the same request would consume with InvokeModel or Converse. Which Bedrock operation should it use? Choose ONE.
- Bedrock per-request metadata
- API Gateway stage or method throttling
- Bedrock CountTokens
- Bedrock GetAsyncInvoke
Correct Answer: C
Correct Answer
Answer C is correct because The best answer is the Amazon Bedrock CountTokens operation. It returns the model-specific token count for an InvokeModel or Converse input before inference. That mechanism aligns with the requirement to measure model-specific input tokens before inference, whereas the distractors operate at different layers or solve different operational problems.
Incorrect Answers
Answer A is incorrect because Amazon Bedrock per-request metadata with model invocation logging serves another architectural need because it can record caller-supplied key-value tags with each supported Bedrock invocation when logging is enabled. It is appropriate when attribution dimensions vary on every call. The tested scenario needs the team to measure model-specific input tokens before inference, which this option does not deliver.
Answer B is incorrect because API Gateway stage or method throttling helps an implementation applies rate and burst targets to an API stage or method. Its value appears when one endpoint needs service-level request-rate protection. In this scenario the missing capability must measure model-specific input tokens before inference; this option leaves that requirement untouched.
Answer D is incorrect because Amazon Bedrock GetAsyncInvoke would retrieve status and details for one asynchronous Bedrock invocation by ARN. Its strongest fit is where one known async job must be checked. The question asks for a way to measure model-specific input tokens before inference, which calls for a different control.
Question 7
A mobile client cannot change its request field names, while the new backend integration expects a different JSON structure. The public API contract must remain stable. Which API Gateway feature should reshape the request before it reaches the backend? Choose ONE.
- API Gateway body request validation
- API Gateway stage or method throttling
- OpenAPI definition import
- API Gateway mapping template
Correct Answer: D
Correct Answer
Answer D is correct because The best answer is an API Gateway request mapping template. It transforms an incoming API payload into the shape required by the backend integration. That mechanism aligns with the requirement to transform the external payload into the backend request shape, whereas the distractors operate at different layers or solve different operational problems.
Incorrect Answers
Answer A is incorrect because API Gateway request validator with a JSON Schema model provides a useful but different function by letting the system validate the request body against a configured JSON Schema before API Gateway invokes the backend. It fits situations where bad request bodies must be rejected at ingress. The scenario’s determining requirement is to transform the external payload into the backend request shape, so this option is not sufficient.
Answer B is incorrect because The role of API Gateway stage or method throttling is to apply rate and burst targets to an API stage or method. That helps when one endpoint needs service-level request-rate protection. The present constraint is to transform the external payload into the backend request shape, making this a neighboring capability rather than the right choice.
Answer C is incorrect because Choose an OpenAPI definition imported into API Gateway when the goal is to define paths, methods, schemas, and API Gateway extensions in an importable interface specification. It belongs in cases where teams need one version-controlled API contract. This case instead asks how to transform the external payload into the backend request shape, so another AWS capability is required.
Question 8
A browser maintains one bidirectional WebSocket connection. Incoming messages carry an `action` value such as `join`, `prompt`, or `cancel`, and each value should invoke a different integration. Which API Gateway mechanism should dispatch these messages? Choose ONE.
- API Gateway usage plan quota
- Server-Sent Events (SSE)
- API Gateway mapping template
- API Gateway WebSocket route selection
Correct Answer: D
Correct Answer
Answer D is correct because Use an API Gateway WebSocket route selection expression with custom routes. It selects a WebSocket backend integration from a message field while the connection remains open, matching the need to route WebSocket messages to handlers according to an action field. The other choices are useful for adjacent concerns but do not provide this specific control.
Incorrect Answers
Answer A is incorrect because an API Gateway usage plan with API keys and per-client quotas can associate API keys with per-client target rates and time-based quotas. That is valuable when partners need separate request allowances. It does not meet the current need to route WebSocket messages to handlers according to an action field, so selecting it would leave the core requirement unsatisfied.
Answer B is incorrect because With Server-Sent Events (SSE), the architecture can deliver one-way incremental events from server to browser over an HTTP connection. That is appropriate if the client only needs server-pushed generation updates. Here the team must route WebSocket messages to handlers according to an action field; therefore this feature would not resolve the scenario’s deciding constraint.
Answer C is incorrect because Consider an API Gateway request mapping template for cases where the system should transform an incoming API payload into the shape required by the backend integration, especially when legacy clients cannot change their external request contract. The stated requirement is different because the team needs to route WebSocket messages to handlers according to an action field; this feature would not achieve it.
Question 9
A web client only needs the server to push incremental generation updates over HTTP; it will send no commands back over that same stream. Which transport pattern is most appropriate? Choose ONE.
- API Gateway WebSocket route selection
- Bedrock GetAsyncInvoke
- Server-Sent Events (SSE)
- API Gateway stage or method throttling
Correct Answer: C
Correct Answer
Answer C is correct because Server-Sent Events (SSE) directly addresses the case because it delivers one-way incremental events from server to browser over an HTTP connection. The scenario requires the team to stream one-way server events to the browser over HTTP, which this mechanism satisfies without relying on an unrelated feature.
Incorrect Answers
Answer A is incorrect because an API Gateway WebSocket route selection expression with custom routes helps an implementation selects a WebSocket backend integration from a message field while the connection remains open. Its value appears when different bidirectional client actions need different handlers. In this scenario the missing capability must stream one-way server events to the browser over HTTP; this option leaves that requirement untouched.
Answer B is incorrect because Amazon Bedrock GetAsyncInvoke retrieves status and details for one asynchronous Bedrock invocation by ARN. It is useful when one known async job must be checked. The scenario instead requires the team to stream one-way server events to the browser over HTTP, so this option solves a different problem.
Answer D is incorrect because API Gateway stage or method throttling serves another architectural need because it can apply rate and burst targets to an API stage or method. It is appropriate when one endpoint needs service-level request-rate protection. The tested scenario needs the team to stream one-way server events to the browser over HTTP, which this option does not deliver.
Question 10
An application started an asynchronous Bedrock invocation and stored the returned invocation ARN. It now needs the current status and failure details for that single job. Which runtime operation should it call? Choose ONE.
- Bedrock CountTokens
- Bedrock per-request metadata
- Bedrock ListAsyncInvokes
- Bedrock GetAsyncInvoke
Correct Answer: D
Correct Answer
Answer D is correct because Amazon Bedrock GetAsyncInvoke directly addresses the case because it retrieves status and details for one asynchronous Bedrock invocation by ARN. The scenario requires the team to retrieve one known asynchronous invocation by ARN, which this mechanism satisfies without relying on an unrelated feature.
Incorrect Answers
Answer A is incorrect because The role of the Amazon Bedrock CountTokens operation is to return the model-specific token count for an InvokeModel or Converse input before inference. That helps when the application must measure tokens before submission. The present constraint is to retrieve one known asynchronous invocation by ARN, making this a neighboring capability rather than the right choice.
Answer B is incorrect because Choose Amazon Bedrock per-request metadata with model invocation logging when the goal is to record caller-supplied key-value tags with each supported Bedrock invocation when logging is enabled. It belongs in cases where attribution dimensions vary on every call. This case instead asks how to retrieve one known asynchronous invocation by ARN, so another AWS capability is required.
Answer C is incorrect because Amazon Bedrock ListAsyncInvokes focuses on a different layer: it lists asynchronous Bedrock invocations and can filter by status and submission time. That is a strong match when operations need a filtered set of async jobs. The question instead requires a mechanism to retrieve one known asynchronous invocation by ARN, so this is not the best answer.
Question 11
Operations needs a report of all failed asynchronous Bedrock invocations submitted during a recent time window. No individual invocation ARN is known in advance. Which runtime operation best fits? Choose ONE.
- Bedrock CountTokens
- Bedrock GetAsyncInvoke
- Bedrock ListAsyncInvokes
- CloudWatch Logs Insights
Correct Answer: C
Correct Answer
Answer C is correct because Amazon Bedrock ListAsyncInvokes provides the needed implementation because it lists asynchronous Bedrock invocations and can filter by status and submission time. The scenario’s deciding constraint is to list and filter multiple asynchronous invocations by status and submission time; this capability meets that constraint at the correct architectural point.
Incorrect Answers
Answer A is incorrect because With the Amazon Bedrock CountTokens operation, the architecture can return the model-specific token count for an InvokeModel or Converse input before inference. That is appropriate if the application must measure tokens before submission. Here the team must list and filter multiple asynchronous invocations by status and submission time; therefore this feature would not resolve the scenario’s deciding constraint.
Answer B is incorrect because Consider Amazon Bedrock GetAsyncInvoke for cases where the system should retrieve status and details for one asynchronous Bedrock invocation by ARN, especially when one known async job must be checked. The stated requirement is different because the team needs to list and filter multiple asynchronous invocations by status and submission time; this feature would not achieve it.
Answer D is incorrect because CloudWatch Logs Insights over model invocation logs can query and aggregates captured CloudWatch log fields across many invocation records. That is valuable when operations must find recurring production patterns. It does not meet the current need to list and filter multiple asynchronous invocations by status and submission time, so selecting it would leave the core requirement unsatisfied.
Question 12
A product team wants an accessible web front end for a new GenAI assistant delivered quickly with reusable declarative UI components rather than building the entire interface framework itself. Which AWS capability best fits? Choose ONE.
- OpenAPI definition import
- Amazon Q Developer code generation
- API Gateway WebSocket route selection
- AWS Amplify declarative UI components
Correct Answer: D
Correct Answer
Answer D is correct because AWS Amplify declarative UI components provides the needed implementation because it provides reusable declarative front-end components and managed web application integration. The scenario’s deciding constraint is to accelerate delivery of a declarative GenAI user interface; this capability meets that constraint at the correct architectural point.
Incorrect Answers
Answer A is incorrect because an OpenAPI definition imported into API Gateway defines paths, methods, schemas, and API Gateway extensions in an importable interface specification. It is useful when teams need one version-controlled API contract. The scenario instead requires the team to accelerate delivery of a declarative GenAI user interface, so this option solves a different problem.
Answer B is incorrect because Amazon Q Developer code generation would generate implementation code and SDK integration scaffolding from developer intent and repository context. Its strongest fit is where a developer needs a first implementation quickly. The question asks for a way to accelerate delivery of a declarative GenAI user interface, which calls for a different control.
Answer C is incorrect because an API Gateway WebSocket route selection expression with custom routes serves another architectural need because it can select a WebSocket backend integration from a message field while the connection remains open. It is appropriate when different bidirectional client actions need different handlers. The tested scenario needs the team to accelerate delivery of a declarative GenAI user interface, which this option does not deliver.
Question 13
A claims workflow must extract policy number, claimant, loss date, and requested amount from documents into business-defined fields. Generic summaries are insufficient. Which Bedrock Data Automation configuration should be used? Choose ONE.
- BDA project configuration
- BDA custom output blueprint
- API Gateway body request validation
- BDA standard output
Correct Answer: B
Correct Answer
Answer B is correct because The best answer is Amazon Bedrock Data Automation custom output with a blueprint. It extracts explicitly defined fields from supported content using a custom BDA blueprint. That mechanism aligns with the requirement to extract an explicitly defined business field schema, whereas the distractors operate at different layers or solve different operational problems.
Incorrect Answers
Answer A is incorrect because Choose a Bedrock Data Automation project referenced by InvokeDataAutomationAsync when the goal is to store BDA output configuration and blueprints for reuse by asynchronous automation jobs. It belongs in cases where many jobs must share the same extraction configuration. This case instead asks how to extract an explicitly defined business field schema, so another AWS capability is required.
Answer C is incorrect because API Gateway request validator with a JSON Schema model provides a useful but different function by letting the system validate the request body against a configured JSON Schema before API Gateway invokes the backend. It fits situations where bad request bodies must be rejected at ingress. The scenario’s determining requirement is to extract an explicitly defined business field schema, so this option is not sufficient.
Answer D is incorrect because The role of Amazon Bedrock Data Automation standard output is to return Bedrock Data Automation’s built-in output for a media type without a custom blueprint. That helps when default extraction is sufficient. The present constraint is to extract an explicitly defined business field schema, making this a neighboring capability rather than the right choice.
Question 14
A media workflow sends ordinary documents to Bedrock Data Automation and only needs the service’s built-in general-purpose document output. There is no required custom field list. Which choice is simplest? Choose ONE.
- CloudWatch Logs Insights
- BDA standard output
- BDA custom output blueprint
- BDA project configuration
Correct Answer: B
Correct Answer
Answer B is correct because Use Amazon Bedrock Data Automation standard output. It returns Bedrock Data Automation’s built-in output for a media type without a custom blueprint, matching the need to use BDA’s default document output without a custom field schema. The other choices are useful for adjacent concerns but do not provide this specific control.
Incorrect Answers
Answer A is incorrect because Consider CloudWatch Logs Insights over model invocation logs for cases where the system should query and aggregates captured CloudWatch log fields across many invocation records, especially when operations must find recurring production patterns. The stated requirement is different because the team needs to use BDA’s default document output without a custom field schema; this feature would not achieve it.
Answer C is incorrect because Amazon Bedrock Data Automation custom output with a blueprint can extract explicitly defined fields from supported content using a custom BDA blueprint. That is valuable when the business requires a fixed extraction schema. It does not meet the current need to use BDA’s default document output without a custom field schema, so selecting it would leave the core requirement unsatisfied.
Answer D is incorrect because With a Bedrock Data Automation project referenced by InvokeDataAutomationAsync, the architecture can store BDA output configuration and blueprints for reuse by asynchronous automation jobs. That is appropriate if many jobs must share the same extraction configuration. Here the team must use BDA’s default document output without a custom field schema; therefore this feature would not resolve the scenario’s deciding constraint.
Question 15
A company has standardized a Bedrock Data Automation extraction configuration, including output settings and custom blueprints, and must reuse it across many asynchronous processing jobs. What should each job reference? Choose ONE.
- BDA project configuration
- BDA custom output blueprint
- BDA standard output
- OpenAPI definition import
Correct Answer: A
Correct Answer
Answer A is correct because a Bedrock Data Automation project referenced by InvokeDataAutomationAsync directly addresses the case because it stores BDA output configuration and blueprints for reuse by asynchronous automation jobs. The scenario requires the team to reuse the same managed BDA processing configuration across jobs, which this mechanism satisfies without relying on an unrelated feature.
Incorrect Answers
Answer B is incorrect because Amazon Bedrock Data Automation custom output with a blueprint serves another architectural need because it can extract explicitly defined fields from supported content using a custom BDA blueprint. It is appropriate when the business requires a fixed extraction schema. The tested scenario needs the team to reuse the same managed BDA processing configuration across jobs, which this option does not deliver.
Answer C is incorrect because Amazon Bedrock Data Automation standard output lets an implementation return Bedrock Data Automation’s built-in output for a media type without a custom blueprint. Its value appears when default extraction is sufficient. In this scenario the missing capability must reuse the same managed BDA processing configuration across jobs; this option leaves that requirement untouched.
Answer D is incorrect because an OpenAPI definition imported into API Gateway defines paths, methods, schemas, and API Gateway extensions in an importable interface specification. It is useful when teams need one version-controlled API contract. The scenario instead requires the team to reuse the same managed BDA processing configuration across jobs, so this option solves a different problem.
Question 16
A developer has a design for a Bedrock SDK integration and wants an AI coding assistant to produce the initial client scaffolding and example calls inside the repository. Which capability is most appropriate? Choose ONE.
- Amazon Q Developer test assistance
- AWS Amplify declarative UI components
- Amazon Q Developer code generation
- Amazon Q Developer refactoring
Correct Answer: C
Correct Answer
Answer C is correct because Select Amazon Q Developer code generation. Its relevant behavior is that it generates implementation code and SDK integration scaffolding from developer intent and repository context. This directly supports the goal to generate the first integration implementation from developer intent, while the other options would not satisfy the same technical condition.
Incorrect Answers
Answer A is incorrect because Amazon Q Developer assistance for AI component tests focuses on a different layer: it helps create automated test code and cases for GenAI application components. That is a strong match when developers need faster test creation around an existing integration. The question instead requires a mechanism to generate the first integration implementation from developer intent, so this is not the best answer.
Answer B is incorrect because AWS Amplify declarative UI components provides a useful but different function by letting the system provide reusable declarative front-end components and managed web application integration. It fits situations where the product needs a GenAI interface quickly. The scenario’s determining requirement is to generate the first integration implementation from developer intent, so this option is not sufficient.
Answer D is incorrect because Choose Amazon Q Developer refactoring assistance when the goal is to restructure existing code to reduce duplication while preserving intended behavior. It belongs in cases where working GenAI code needs maintainability improvements. This case instead asks how to generate the first integration implementation from developer intent, so another AWS capability is required.
Question 17
A working GenAI service has duplicated model-invocation and error-handling code across several modules. The team wants AI assistance consolidating the implementation while preserving behavior. Which capability fits best? Choose ONE.
- CloudWatch Logs Insights
- Amazon Q Developer refactoring
- Amazon Q Developer code generation
- Amazon Q Developer test assistance
Correct Answer: B
Correct Answer
Answer B is correct because Amazon Q Developer refactoring assistance fits because it restructures existing code to reduce duplication while preserving intended behavior. The requirement is to refactor existing GenAI code to improve maintainability. This option provides that behavior directly; the alternatives target different parts of the integration stack.
Incorrect Answers
Answer A is incorrect because CloudWatch Logs Insights over model invocation logs is intended to query and aggregates captured CloudWatch log fields across many invocation records. That matters when operations must find recurring production patterns. Here the required decision is how to refactor existing GenAI code to improve maintainability; this capability does not supply that behavior.
Answer C is incorrect because With Amazon Q Developer code generation, the architecture can generate implementation code and SDK integration scaffolding from developer intent and repository context. That is appropriate if a developer needs a first implementation quickly. Here the team must refactor existing GenAI code to improve maintainability; therefore this feature would not resolve the scenario’s deciding constraint.
Answer D is incorrect because Consider Amazon Q Developer assistance for AI component tests for cases where the system should help create automated test code and cases for GenAI application components, especially when developers need faster test creation around an existing integration. The stated requirement is different because the team needs to refactor existing GenAI code to improve maintainability; this feature would not achieve it.
Question 18
A new GenAI integration already compiles, but the team has little automated coverage for prompt adapters, client wrappers, and response-handling utilities. Which Amazon Q Developer use best accelerates the next step? Choose ONE.
- Amazon Q Developer code generation
- Amazon Q Developer test assistance
- Amazon Q Developer refactoring
- Amazon Q Developer error analysis
Correct Answer: B
Correct Answer
Answer B is correct because Amazon Q Developer assistance for AI component tests provides the needed implementation because it helps create automated test code and cases for GenAI application components. The scenario’s deciding constraint is to create automated tests for existing AI application components; this capability meets that constraint at the correct architectural point.
Incorrect Answers
Answer A is incorrect because Amazon Q Developer code generation serves another architectural need because it can generate implementation code and SDK integration scaffolding from developer intent and repository context. It is appropriate when a developer needs a first implementation quickly. The tested scenario needs the team to create automated tests for existing AI application components, which this option does not deliver.
Answer C is incorrect because Amazon Q Developer refactoring assistance restructures existing code to reduce duplication while preserving intended behavior. It is useful when working GenAI code needs maintainability improvements. The scenario instead requires the team to create automated tests for existing AI application components, so this option solves a different problem.
Answer D is incorrect because Amazon Q Developer for GenAI-specific error-pattern analysis would use AI assistance to interpret recurring GenAI code and runtime error patterns. Its strongest fit is where developers need help diagnosing unfamiliar integration failures. The question asks for a way to create automated tests for existing AI application components, which calls for a different control.
Question 19
Operations has thousands of Bedrock model invocation log records and must aggregate recurring error text, token spikes, and prompt/response patterns across requests. Which tool is the most direct choice? Choose ONE.
- CloudWatch Logs Insights
- Amazon Q Developer error analysis
- Bedrock per-request metadata
- AWS X-Ray sampling rule
Correct Answer: A
Correct Answer
Answer A is correct because CloudWatch Logs Insights over model invocation logs matches the design requirement by allowing the system to query and aggregate captured CloudWatch log fields across many invocation records. Because the team must query and aggregate historical model invocation logs, this is the option that supplies the necessary AWS mechanism.
Incorrect Answers
Answer B is incorrect because The role of Amazon Q Developer for GenAI-specific error-pattern analysis is to use AI assistance to interpret recurring GenAI code and runtime error patterns. That helps when developers need help diagnosing unfamiliar integration failures. The present constraint is to query and aggregate historical model invocation logs, making this a neighboring capability rather than the right choice.
Answer C is incorrect because Choose Amazon Bedrock per-request metadata with model invocation logging when the goal is to record caller-supplied key-value tags with each supported Bedrock invocation when logging is enabled. It belongs in cases where attribution dimensions vary on every call. This case instead asks how to query and aggregate historical model invocation logs, so another AWS capability is required.
Answer D is incorrect because an AWS X-Ray sampling rule focuses on a different layer: it controls which API Gateway REST requests X-Ray records and at what sampling rate. That is a strong match when tracing exists but the captured sample must be tuned. The question instead requires a mechanism to query and aggregate historical model invocation logs, so this is not the best answer.
Question 20
An experimentation service needs an `experiment` tag that can differ on every Bedrock InvokeModel or Converse call and later appear with that invocation in model invocation logs. Which mechanism should the client use? Choose ONE.
- Bedrock per-request metadata
- Bedrock CountTokens
- API Gateway usage plan quota
- CloudWatch Logs Insights
Correct Answer: A
Correct Answer
Answer A is correct because The best answer is Amazon Bedrock per-request metadata with model invocation logging. It records caller-supplied key-value tags with each supported Bedrock invocation when logging is enabled. That mechanism aligns with the requirement to attach a per-call attribution dimension to Bedrock invocation logs, whereas the distractors operate at different layers or solve different operational problems.
Incorrect Answers
Answer B is incorrect because With the Amazon Bedrock CountTokens operation, the architecture can return the model-specific token count for an InvokeModel or Converse input before inference. That is appropriate if the application must measure tokens before submission. Here the team must attach a per-call attribution dimension to Bedrock invocation logs; therefore this feature would not resolve the scenario’s deciding constraint.
Answer C is incorrect because Consider an API Gateway usage plan with API keys and per-client quotas for cases where the system should associate API keys with per-client target rates and time-based quotas, especially when partners need separate request allowances. The stated requirement is different because the team needs to attach a per-call attribution dimension to Bedrock invocation logs; this feature would not achieve it.
Answer D is incorrect because CloudWatch Logs Insights over model invocation logs is intended to query and aggregates captured CloudWatch log fields across many invocation records. That matters when operations must find recurring production patterns. Here the required decision is how to attach a per-call attribution dimension to Bedrock invocation logs; this capability does not supply that behavior.