A company is developing a customer support application that uses Amazon Bedrock foundation models (FMs) to provide real-time AI assistance to the company's employees. The application must display AI-generated responses character by character as the responses are generated. The application needs to support thousands of concurrent users with minimal latency. The responses typically take 15 to 45 seconds to finish. Which solution will meet these requirements?
-
A
Configure an Amazon API Gateway WebSocket API with an AWS Lambda integration. Configure the WebSocket API to invoke the Amazon Bedrock InvokeModelWithResponseStream API and stream partial responses through WebSocket connections.
-
B
Configure an Amazon API Gateway REST API with an AWS Lambda integration. Configure the REST API to invoke the Amazon Bedrock standard InvokeModel API and implement frontend client-side polling every 100 ms for complete response chunks.
-
C
Implement direct frontend client connections to Amazon Bedrock by using IAM user credentials and the InvokeModelWithResponseStream API without any intermediate gateway or proxy layer.
-
D
Configure an Amazon API Gateway HTTP API with an AWS Lambda integration. Configure the HTTP API to cache complete responses in an Amazon DynamoDB table and serve the responses through multiple paginated GET requests to frontend clients.
Reveal answer details
Close answer details
Correct answerA
ExplanationInvokeModelWithResponseStream produces partial model output while generation is still in progress. A WebSocket API maintains a connection through which the Lambda integration can forward those partial responses immediately, so users do not wait 15-45 seconds for a completed result. The managed API Gateway connection layer also supports the large number of simultaneous clients more appropriately than polling.
A global media company uses an Amazon Bedrock foundation model in a customer support application. The selected model is available only in a subset of AWS Regions. The company must keep the application available during a regional service disruption without changing application code for each incident. Which design should the company use?
-
A
Configure Amazon Bedrock provisioned throughput in the primary Region only, and retry failed requests until capacity becomes available.
-
B
Use Amazon Bedrock Cross-Region Inference with an inference profile, and implement application fallback logic for responses that cannot be served.
-
C
Store every user prompt in Amazon S3 and replay failed prompts after the primary Region recovers.
-
D
Use Amazon Route 53 weighted records to route users to separate API endpoints that call the same primary Region model endpoint.
Reveal answer details
Close answer details
Correct answerB
ExplanationA cross-Region inference profile gives the application one Bedrock inference configuration that can use supported capacity across Regions, avoiding incident-specific model endpoint changes. If the service cannot satisfy a request through that profile, application fallback logic provides the next handling path. This combination addresses both Regional disruption and cases in which the selected model has limited Regional availability.
A company is building a legal research AI assistant that uses Amazon Bedrock with an Anthropic Claude foundation model (FM). The AI assistant must retrieve highly relevant case law documents to augment the FM's responses. The AI assistant must identify semantic relationships between legal concepts, specific legal terminology, and citations. The AI assistant must perform quickly and return precise results. Which solution will meet these requirements?
-
A
Configure an Amazon Bedrock knowledge base to use a default vector search configuration. Use Amazon Bedrock to expand queries to improve retrieval for legal documents based on specific terminology and citations.
-
B
Use Amazon OpenSearch Service to deploy a hybrid search architecture that combines vector search with keyword search. Apply an Amazon Bedrock reranker model to optimize result relevance.
-
C
Enable the Amazon Kendra query suggestion feature for end users. Use Amazon Bedrock to perform post-processing of search results to identify semantic similarity in the documents and to produce precise results.
-
D
Use Amazon OpenSearch Service with vector search and Amazon Bedrock Titan Embeddings to index and search legal documents. Use custom AWS Lambda functions to merge results with keyword-based filters that are stored in an Amazon RDS database.
Reveal answer details
Close answer details
Correct answerB
ExplanationVector search captures semantic relationships among legal concepts, while keyword search preserves exact legal terminology and citation matching. An OpenSearch hybrid search combines both result signals in one retrieval architecture. Applying an Amazon Bedrock reranker then reorders the candidate documents by contextual relevance, producing a more precise set of case law for response augmentation.
A company is using Amazon Bedrock to develop an AI-powered application that uses a foundation model (FM) that supports cross-Region inference and provisioned throughput. The application must serve users in Europe and North America with consistently low latency. The application must comply with data residency regulations that require European user data to remain within Europe-based AWS Regions. During testing, the application experiences service degradation when Regional traffic spikes reach service quotas. The company needs a solution that maintains application resilience and minimizes operational complexity. Which solution will meet these requirements?
-
A
Deploy separate Amazon Bedrock instances in North American and European Regions. Use a custom routing layer that directs traffic based on user location. Configure Amazon CloudWatch alarms to monitor Regional service usage. Use Amazon SNS to send email alerts when usage approaches thresholds.
-
B
Use Amazon Bedrock cross-Region inference profiles by specifying geographical codes in profile IDs when calling the InvokeModel API. Configure separate Amazon API Gateway HTTP APIs to direct European and North American users to the appropriate Regional endpoints.
-
C
Deploy a multi-Region Amazon API Gateway HTTP API and AWS Lambda functions that implement retry logic to handle throttling. Configure the Lambda functions to call the FM in the nearest secondary Region when quotas are reached.
-
D
Configure provisioned throughput for Amazon Bedrock in multiple Regions. Implement failover logic in application code to switch Regions when throttling occurs. Use AWS Global Accelerator to route traffic based on user location.
Reveal answer details
Close answer details
Correct answerB
ExplanationGeographically scoped cross-Region inference profiles can route requests across supported Regions within the specified geography when one Region encounters demand pressure. Using the Europe code for European calls keeps that traffic within Europe, while a separate North American path serves those users. Regional API Gateway endpoints direct each population to the appropriate profile without custom quota-aware failover logic.
Incoming support records contain personal identifiers, but the summarization task needs only issue category and resolution text. What should happen before model invocation and indexing?
-
A
Classify first, minimize or tokenize identifiers, and exclude them from prompts, indexes, and logs.
-
B
Send complete records to the model and rely on output filtering to remove identifiers after they have been processed.
-
C
Embed every identifier because converting sensitive text into vectors removes its privacy and compliance implications.
-
D
Store full prompts in logs for later masking because classification is reliable only after the model produces a summary.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe task does not require personal identifiers, so they should be detected before any model or indexing boundary. Minimizing or tokenizing those fields preserves only what the issue categorization and resolution summary need. Excluding identifiers from prompts, vector indexes, and logs prevents unnecessary copies from being created, reducing exposure throughout inference, retrieval, and operational records instead of filtering only the final text.
A specialty coffee company has a mobile app that generates personalized coffee roast profiles by using Amazon Bedrock with a three-stage prompt chain. The prompt chain converts user inputs into structured metadata, retrieves relevant logs for coffee roasts, and generates a personalized roast recommendation for each customer. Users in multiple AWS Regions report inconsistent roast recommendations for identical inputs, slow inference during the retrieval step, and unsafe recommendations such as brewing at excessively high temperatures. The company must improve the stability of outputs for repeated inputs. The company must also improve app performance and the safety of the app’s outputs. The updated solution must ensure 99.5% output consistency for identical inputs and achieve inference latency of less than 1 second. The solution must also block unsafe or hallucinated recommendations by using validated safety controls. Which solution will meet these requirements?
-
A
Use Amazon Bedrock with provisioned throughput and deterministic inference settings, such as a low temperature, to improve output consistency and inference performance. Cache frequently retrieved roast data to reduce retrieval latency. Apply Amazon Bedrock Guardrails with denied topics, content filters, and contextual grounding checks to block unsafe or hallucinated recommendations. Use Amazon Bedrock Prompt Management to version and manage validated prompts.
-
B
Use Amazon Bedrock Agents to manage chaining. Log model inputs and outputs to Amazon CloudWatch Logs. Use logs from Amazon CloudWatch to perform A/B testing for prompt versions.
-
C
Cache prompt results in Amazon ElastiCache. Use AWS Lambda functions to preprocess metadata and to trace end-to-end latency. Use AWS X-Ray to identify and remediate performance bottlenecks.
-
D
Use Amazon Kendra to improve roast log retrieval accuracy. Store normalized prompt metadata within Amazon DynamoDB. Use AWS Step Functions to orchestrate multi-step prompts.
Reveal answer details
Close answer details
Correct answerA
ExplanationThe solution must address consistency, latency, and safety simultaneously. Deterministic inference settings and versioned prompts improve repeatability, while provisioned throughput provides predictable inference capacity and caching reduces latency in the retrieval stage. Amazon Bedrock Guardrails provides content filters and denied topics for unsafe content and contextual grounding checks for detecting and filtering ungrounded or irrelevant model responses. Prompt Management provides controlled prompt management and versioning. The other approaches address only individual aspects such as orchestration, monitoring, or retrieval and therefore do not satisfy all of the requirements.
A company is implementing a serverless inference API by using AWS Lambda. The API will dynamically invoke multiple AI models hosted on Amazon Bedrock. The company needs to design a solution that can switch between model providers without modifying or redeploying Lambda code in real time. The design must include safe rollout of configuration changes and validation and rollback capabilities. Which solution will meet these requirements?
-
A
Store the active model provider in AWS Systems Manager Parameter Store. Configure a Lambda function to read the parameter at runtime to determine which model to invoke.
-
B
Store the active model provider in AWS AppConfig. Configure a Lambda function to read the configuration at runtime to determine which model to invoke.
-
C
Configure an Amazon API Gateway REST API to route requests to separate Lambda functions. Hardcode each Lambda function to a specific model provider. Switch the integration target manually.
-
D
Store the active model provider in a JSON file hosted on Amazon S3. Use AWS AppConfig to reference the S3 file as a hosted configuration source. Configure a Lambda function to read the file through AppConfig at runtime to determine which model to invoke.
Reveal answer details
Close answer details
Correct answerB
ExplanationStore the active model provider in AWS AppConfig so the Lambda function can read the current choice at runtime and invoke the corresponding model without code deployment. AppConfig is designed for controlled configuration rollouts, including validation, monitoring, and rollback of a bad change. This meets both real-time switching and safe-release requirements in one managed configuration service.
Before approving a question-answering configuration, the team must measure factual support, relevance, completeness, and usefulness across different customer segments. Which evaluation design provides the strongest evidence?
-
A
Use representative held-out cases, separate task metrics, calibrated human rubrics, and segment-level results.
-
B
Test a public benchmark, combine all dimensions into one average score, and approve the highest-scoring configuration.
-
C
Test examples used during development, apply one lexical-overlap metric, and review only responses below its threshold.
-
D
Test a small random sample, ask reviewers for an overall preference, and report only the aggregate win rate.
Reveal answer details
Close answer details
Correct answerA
ExplanationRepresentative held-out cases test behavior on examples that were not used to shape the configuration, while segment-level reporting reveals failures hidden by an aggregate score. Separate task metrics preserve the distinctions among factual support, relevance, and completeness. Calibrated human rubrics can then assess usefulness consistently, producing evidence for every required dimension and customer group.
An elevator service company has developed an AI assistant application by using Amazon Bedrock. The application generates elevator maintenance recommendations to support the company's elevator technicians. The company uses Amazon Kinesis Data Streams to collect the elevator sensor data. New regulatory rules require that a human technician must review all AI-generated recommendations. The company needs to establish human oversight workflows to review and approve AI recommendations. The company must store all human technician review decisions for audit purposes. Which solution will meet these requirements?
-
A
Create a custom approval workflow by using AWS Lambda functions and Amazon SQS queues for human review of AI recommendations. Store all review decisions in Amazon DynamoDB for audit purposes.
-
B
Create an AWS Step Functions workflow that has a human approval step that uses the waitForTaskToken API to pause execution. After a human technician completes a review, use an AWS Lambda function to call the SendTaskSuccess API with the approval decision. Store all review decisions in Amazon DynamoDB.
-
C
Create an AWS Glue workflow that has a human approval step. After the human technician review, integrate the application with an AWS Lambda function that calls the SendTaskSuccess API. Store all human technician review decisions in Amazon DynamoDB.
-
D
Configure Amazon EventBridge rules with custom event patterns to route AI recommendations to human technicians for review. Create AWS Glue jobs to process human technician approval queues. Use Amazon ElastiCache to cache all human technician review decisions.
Reveal answer details
Close answer details
Correct answerB
ExplanationThe Step Functions waitForTaskToken pattern pauses each recommendation workflow until a technician completes the mandatory review. The review handler returns the token through SendTaskSuccess together with the approval decision, allowing execution to continue only after human action. Writing every decision to DynamoDB creates a durable audit record tied to the oversight workflow.
Question 10
Single choice
A company has a generative AI (GenAI) application that uses Amazon Bedrock to provide real-time responses to customer queries. The company has noticed intermittent failures with API calls to foundation models (FMs) during peak traffic periods. The company needs a solution to handle transient errors and provide detailed observability into FM performance. The solution must prevent cascading failures during throttling events and provide distributed tracing across service boundaries to identify latency contributors. The solution must also enable correlation of performance issues with specific FM characteristics. Which solution will meet these requirements?
-
A
Implement a custom retry mechanism with a fixed delay of 1 second between retries. Configure Amazon CloudWatch alarms to monitor the application's error rates and latency metrics.
-
B
Configure the AWS SDK with standard retry mode and exponential backoff with jitter. Use AWS X-Ray tracing with annotations to identify and filter service components.
-
C
Implement client-side caching of all FM responses. Add custom logging statements in the application code to record API call durations.
-
D
Configure the AWS SDK with adaptive retry mode. Use AWS CloudTrail distributed tracing to monitor throttling events.
Reveal answer details
Close answer details
Correct answerB
ExplanationStandard retry mode handles transient failures with exponential backoff, and jitter prevents many clients from retrying simultaneously during throttling, reducing the chance of a cascading failure. AWS X-Ray follows requests across service boundaries to expose latency contributors. Annotations add searchable FM characteristics, allowing traces and performance problems to be filtered and correlated by model-related attributes.
Question 11
Single choice
A medical device company wants to feed reports of medical procedures that used the company's devices into an AI assistant. To protect patient privacy, the AI assistant must expose patient personally identifiable information (PII) only to surgeons. The AI assistant must redact PII for engineers. The AI assistant must reference only medical reports that are less than 3 years old. The company stores reports in an Amazon S3 bucket as soon as each report is published. The company has already set up an Amazon Bedrock Knowledge Bases. The AI assistant uses Amazon Cognito to authenticate users. Which solution will meet these requirements?
-
A
Enable Amazon Macie PII detection on the S3 bucket. Use an S3 trigger to invoke an AWS Lambda function that redacts PII from the reports. Configure the Lambda function to delete outdated documents and invoke knowledge base syncing.
-
B
Invoke an AWS Lambda function to sync the S3 bucket and the knowledge base when a new report is uploaded. Use a second Lambda function with Amazon Comprehend to redact PII for engineers. Use S3 Lifecycle rules to remove reports older than 3 years.
-
C
Set up an S3 Lifecycle configuration to remove reports that are older than 3 years. Schedule an AWS Lambda function to run daily syncs between the bucket and the knowledge base. When users interact with the AI assistant, apply a guardrail configuration selected based on the user's Cognito user group to redact PII from responses when required.
-
D
Create a second knowledge base. Use Lambda and Amazon Comprehend to redact PII before syncing to the second knowledge base. Route users to the appropriate knowledge base based on Cognito group membership.
Reveal answer details
Close answer details
Correct answerC
ExplanationS3 Lifecycle removes reports after the three-year retention boundary, and daily Lambda synchronization updates the existing knowledge base so retrieval follows that corpus. At response time, the application selects a guardrail from the authenticated user's Cognito group. The engineer configuration redacts PII, while the surgeon configuration can preserve authorized patient information without maintaining duplicate knowledge bases.
Question 12
Single choice
A guardrail policy defines denied topics, sensitive-information handling, and grounding checks, but prohibited responses still appear because runtime requests omit the guardrail version. What is required?
-
A
Increase every filter to maximum strength; runtime association is optional once a guardrail has been created.
-
B
Copy the policy into the system prompt because prompts automatically govern both input and output processing.
-
C
Depend on the model's default safety behavior and apply the guardrail only when users report a policy violation.
-
D
Associate the intended guardrail version with requests and test its controls on representative traffic.
Reveal answer details
Close answer details
Correct answerD
ExplanationA defined guardrail has no effect on an invocation that does not reference it. Each runtime request must therefore be associated with the intended guardrail version so its denied-topic, sensitive-information, and grounding controls are actually evaluated. Representative traffic testing then confirms that the associated version applies the required behavior to realistic inputs and outputs before release.
Question 13
Single choice
Inference costs are rising, and requests vary widely in complexity while answer quality must remain stable. What should the team do?
-
A
Route every request to the lowest-priced model and use longer prompts to compensate for any quality difference.
-
B
Measure token use, trim context, tune retrieval, route by complexity, and recheck quality.
-
C
Truncate every input to the same token count because shorter context cannot affect answers to simple requests.
-
D
Reduce only maximum output length because input context and repeated retrieval do not materially affect inference cost.
Reveal answer details
Close answer details
Correct answerB
ExplanationCost optimization must identify where tokens are consumed before changing behavior. Measuring usage exposes excess input, output, or retrieval context; trimming context and tuning retrieval reduce unnecessary material. Routing simple and complex requests to suitable models avoids paying the same rate for every case. Rechecking quality verifies that these savings preserve the required answer performance.
Question 14
Single choice
Image-generation jobs arrive in bursts and can run longer than the API request timeout. Clients need status and completion notifications. Which integration is most suitable?
-
A
Hold each HTTP connection open, increase its timeout, and retry the entire request whenever the connection closes.
-
B
Queue validated work with correlation IDs, use quota-aware workers, and publish stored status and results.
-
C
Send every job synchronously from API Gateway and add more client connections whenever the model begins throttling.
-
D
Put jobs on a queue and assume delivery provides exactly-once side effects without result state or duplicate handling.
Reveal answer details
Close answer details
Correct answerB
ExplanationJobs that outlast an API timeout need an asynchronous boundary. A queue accepts validated work during bursts, correlation IDs connect each submission to its result, and quota-aware workers consume jobs at a sustainable rate. Persisting status and results lets clients poll or receive completion notifications without holding an HTTP connection open, while retained job state supports duplicate handling and recovery.
Question 15
Single choice
A university recently digitized a collection of archival documents, academic journals, and manuscripts. The university stores the digital files in an AWS Lake Formation data lake. The university hires a GenAI developer to build a solution to allow users to search the digital files by using text queries. The solution must return journal abstracts that are semantically similar to a user's query. Users must be able to search the digitized collection based on text and metadata that is associated with the journal abstracts. The metadata of the digitized files does not contain keywords. The solution must match similar abstracts to one another based on the similarity of their text. The data lake contains fewer than 1 million files. Which solution will meet these requirements with the LEAST operational overhead?
-
A
Use Amazon Titan Embeddings in Amazon Bedrock to create vector representations of the digitized files. Store embeddings in the OpenSearch Neural plugin for Amazon OpenSearch Service.
-
B
Use Amazon Comprehend to extract topics from the digitized files. Store the topics and file metadata in an Amazon Aurora PostgreSQL database. Query the abstract metadata against the data in the Aurora database.
-
C
Use Amazon SageMaker AI to deploy a sentence-transformer model. Use the model to create vector representations of the digitized files. Store embeddings in an Amazon Aurora PostgreSQL database that has the pgvector extension.
-
D
Use Amazon Titan Embeddings in Amazon Bedrock to create vector representations of the digitized files. Store embeddings in an Amazon Aurora PostgreSQL Serverless database that has the pgvector extension.
Reveal answer details
Close answer details
Correct answerD
ExplanationAmazon Titan Embeddings converts abstract text into vectors, so documents can be matched by semantic similarity even when their metadata has no keywords. Aurora PostgreSQL Serverless with pgvector stores the vectors and supports similarity queries together with associated metadata. For a collection below one million files, the managed serverless database avoids hosting a custom embedding model or managing fixed database capacity.
Question 16
Single choice
A chat application must show generated text to users as soon as it is available. The backend invokes Amazon Bedrock and must support long-running responses without making users wait for the complete answer. Which integration pattern should the developer implement?
-
A
Use a nightly batch job to precompute all possible responses and store them in Amazon S3.
-
B
Call the synchronous model API and return the response only after the full completion is finished.
-
C
Use a streaming Amazon Bedrock invocation and deliver chunks to the client through a streaming HTTP, WebSocket, or server-sent events interface.
-
D
Increase the model maximum output tokens so that each response contains more text.
Reveal answer details
Close answer details
Correct answerC
ExplanationA streaming Bedrock invocation returns generated chunks before the model completes the entire response. Forwarding those chunks through streaming HTTP, a WebSocket, or server-sent events lets the client render text immediately and continue updating it during a long generation. This changes perceived responsiveness without requiring a shorter completion or pretending that all possible answers can be computed in advance.
Question 17
Single choice
An enterprise application already stores customer cases in Amazon Aurora PostgreSQL. A GenAI feature must perform vector similarity search over case notes while joining results with relational customer metadata and existing SQL access controls. Which vector store choice is the best fit?
-
A
Amazon S3, because object storage can replace all relational joins if metadata is stored in file names.
-
B
Amazon DynamoDB without a vector index, because key-value access is always faster than vector search.
-
C
Amazon Aurora PostgreSQL with the pgvector extension and appropriate indexes for the case-note embeddings.
-
D
Amazon Kinesis Data Streams, because streaming services are optimized for long-term vector retrieval.
Reveal answer details
Close answer details
Correct answerC
ExplanationAurora PostgreSQL already contains the case and customer data, so pgvector adds embedding similarity search inside the same relational database. Appropriate vector indexes support efficient nearest-neighbor retrieval over case-note embeddings. The application can then join those matches to existing customer metadata with SQL and continue applying the established database access controls instead of duplicating data in another store.
Question 18
Single choice
A media company must use Amazon Bedrock to implement a robust governance process for AI-generated content. The company needs to manage hundreds of prompt templates. Multiple teams use the templates across multiple AWS Regions to generate content. The solution must provide version control with approval workflows that include notifications for pending reviews. The solution must also provide detailed audit trails that document prompt activities and consistent prompt parameterization to enforce quality standards. Which solution will meet these requirements?
-
A
Configure Amazon Bedrock Studio prompt templates. Use Amazon CloudWatch dashboards to display prompt usage metrics. Store approval status in Amazon DynamoDB. Use AWS Lambda functions to enforce approvals.
-
B
Use Amazon Bedrock Prompt Management to implement prompt version control and create parameterized prompt templates by specifying variables. Configure AWS CloudTrail to audit prompt-related API activities. Use AWS Step Functions to implement the prompt approval workflow, and use Amazon SNS to notify reviewers of pending approvals. Use AWS Identity and Access Management (IAM) policies to control permissions for prompt management and approval actions.
-
C
Use AWS Step Functions to create an approval workflow. Store prompts in Amazon S3. Use tags to implement version control. Use Amazon EventBridge to send notifications.
-
D
Deploy Amazon SageMaker Canvas with prompt templates stored in Amazon S3. Use AWS CloudFormation for version control. Use AWS Config to enforce approval policies.
Reveal answer details
Close answer details
Correct answerB
ExplanationAmazon Bedrock Prompt Management is purpose-built to create, manage, test, and version reusable prompts and supports variables such as {{variable}} for consistent parameterization. AWS CloudTrail provides the audit trail for prompt-related API activity, while IAM controls who can perform Prompt Management operations. A workflow service such as Step Functions can implement the required human approval process, with SNS providing pending-review notifications. This combination satisfies prompt versioning, parameterization, approval, notification, access control, and auditing requirements.
Question 19
Multiple choice
A team is preparing to release a new GenAI assistant version. Which two validation practices are most appropriate before production deployment? (Choose two.)
-
A
Run a regression set of representative prompts and compare quality, safety, and formatting against expected outcomes.
-
B
Use canary or staged deployment metrics to compare the new version against the previous version before full rollout.
-
C
Skip testing if the system prompt is shorter than the previous version.
-
D
Evaluate only one successful happy-path prompt because GenAI behavior is nondeterministic.
-
E
Delete prior evaluation results so reviewers focus only on the latest output.
Reveal answer details
Close answer details
Correct answersA, B
ExplanationA representative regression set checks whether the new assistant still meets expected quality, safety, and formatting behavior across important scenarios. A canary or staged deployment then measures the new version against the previous version under limited real traffic before broad exposure. Together, offline comparison catches known regressions and controlled rollout metrics reveal operational differences with a bounded impact.
Question 20
Single choice
A manufacturing company sends tabular inspection records and free-text repair notes to a foundation model. Incorrect units and missing fields often cause poor model responses. The team wants to improve input quality before inference. Which solution is best?
-
A
Send raw records to the model and ask the model to fix all missing fields in the same prompt.
-
B
Increase the model temperature so the model can produce more varied interpretations of incomplete data.
-
C
Use AWS Glue Data Quality, SageMaker Data Wrangler, or Lambda validation logic to check schema, units, and required fields before formatting model inputs.
-
D
Store the records in Amazon S3 Glacier Flexible Retrieval before invoking the model.
Reveal answer details
Close answer details
Correct answerC
ExplanationAWS Glue Data Quality, SageMaker Data Wrangler, or Lambda validation can enforce the expected schema before inference. These checks identify missing required fields, normalize or reject incorrect units, and produce consistently formatted model inputs. Resolving structural data defects at this boundary prevents the foundation model from inventing interpretations for incomplete records and makes downstream responses more dependable.
Question 21
Multiple choice
An ecommerce company is using an Anthropic Claude Sonnet model in Amazon Bedrock to generate product recommendations. An AWS Lambda function retrieves customer purchase data from Amazon DynamoDB, product reviews from Amazon S3, and customer profile information from Amazon RDS. Then the function sends the data directly to the Amazon Bedrock model through API calls. Recently, customers who have extensive purchase histories have begun to receive incomplete recommendations. Amazon CloudWatch logs for the Lambda function show execution timeouts. CloudWatch logs for Amazon Bedrock API calls show intermittent errors. The company reviews the logs and finds that some requests are failing with context-length-exceeded errors. Other requests finish but appear to ignore portions of the input data. The company wants the recommendation system to consider all customer data when the system generates recommendations. The company wants to use Amazon Bedrock Knowledge Bases to improve data organization and retrieval. Which combination of solutions will meet these requirements? (Select TWO.)
-
A
Implement a chunking strategy that divides the customer data into smaller segments. Configure the model to process each segment separately. Invoke the model a final time to synthesize the individual responses into comprehensive recommendations.
-
B
Modify the prompt structure to place the most critical information at the beginning and end of the context window. Implement token-counting logic to truncate less important data when the interaction approaches the model's maximum context length.
-
C
Replace Claude Sonnet with a model that has a larger context-window capacity. Increase the Lambda function timeout to accommodate longer processing times for larger inputs.
-
D
Configure the recommendation system to use the Converse API. Modify the additionalModelRequestFields parameter to increase the maximum token limit beyond the model's default context-window size.
-
E
Implement RAG by using a knowledge base to index the customer data with vector embeddings. Retrieve only the most semantically relevant information for each recommendation request based on the current customer context.
Reveal answer details
Close answer details
Correct answersA, E
ExplanationChunking divides oversized customer histories into segments that fit the model context; processing each segment and synthesizing the partial results ensures information is not silently dropped because of the context limit. The RAG knowledge base indexes customer data as vector embeddings and retrieves the portions most relevant to the current recommendation. This reduces per-call input while preserving access to the organized corpus.
Question 22
Single choice
A company is building a generative AI (GenAI) application that uses Amazon Bedrock APIs to process complex customer inquiries. During peak usage periods, the application experiences intermittent API timeouts that cause issues such as broken response chunks and delayed data delivery. The application struggles to ensure that prompts remain within token limits when handling complex customer inquiries of varying lengths. Users have reported truncated inputs and incomplete responses. The company has also observed foundation model (FM) invocation failures. The company needs a retry strategy that automatically handles transient service errors and prevents overwhelming Amazon Bedrock during peak usage periods. The strategy must also adapt to changing service availability and support response streaming and token-aware request handling. Which solution will meet these requirements?
-
A
Implement a standard retry strategy that uses a 1-second fixed delay between attempts and a 3-retry maximum for all errors. Handle streaming response timeouts by restarting streams. Cap token usage for each session.
-
B
Implement an adaptive retry strategy that uses exponential backoff with jitter and a circuit breaker pattern that temporarily disables retries when error rates exceed a predefined threshold. Implement a streaming response handler that monitors for chunk delivery timeouts. Configure the handler to buffer successfully received chunks and intelligently resume streaming from the last received chunk when connections are re-established.
-
C
Use the AWS SDK to configure a retry strategy in standard mode. Wrap Amazon Bedrock API calls in try-catch blocks that handle timeout exceptions. Return cached completions for failed streaming requests. Enforce a global token limit for all users. Add jitter-based retry logic and lightweight token trimming for each request. Resume broken streams by requesting only missing chunks from the point of failure. Maintain a small in-memory buffer of the most recent chunks.
-
D
Set Amazon Bedrock client request timeouts to 30 seconds. Implement client-side load shedding. Buffer partial results and stop new requests when application performance degrades. Set static token usage caps for all requests. Configure exponential backoff retries, dynamic chunk sizing, and context-aware token limits.
Reveal answer details
Close answer details
Correct answerD
ExplanationThe client timeout places a clear bound on stalled invocations, while client-side load shedding stops additional work when the application is already degraded. Buffered partial results preserve delivered content. Exponential backoff reduces retry pressure, and dynamic chunk sizing with context-aware token limits adapts requests to streaming conditions and inquiry length.
Question 23
Single choice
A healthcare company uses Amazon Bedrock to deploy an application that generates summaries of clinical documents. The application experiences inconsistent response quality with occasional factual hallucinations. Monthly costs exceed the company's projections by 40%. A GenAI developer must implement a near real-time monitoring solution to detect hallucinations, identify abnormal token consumption, and provide early warnings of cost anomalies. The solution must require minimal custom development work and maintenance overhead. Which solution will meet these requirements?
-
A
Configure Amazon CloudWatch alarms to monitor InputTokenCount and OutputTokenCount metrics to detect anomalies. Store model invocation logs in an Amazon S3 bucket. Use AWS Glue and Amazon Athena to identify potential hallucinations.
-
B
Run Amazon Bedrock evaluation jobs that use LLM-based judgments to detect hallucinations. Configure Amazon CloudWatch to track token usage. Create an AWS Lambda function to process CloudWatch metrics. Configure the Lambda function to send usage pattern notifications.
-
C
Configure Amazon Bedrock to store model invocation logs in an Amazon S3 bucket. Enable text output logging. Configure Amazon Bedrock guardrails to run contextual grounding checks to detect hallucinations. Create Amazon CloudWatch anomaly detection alarms for token usage metrics.
-
D
Use AWS CloudTrail to log all Amazon Bedrock API calls. Create a custom dashboard in Amazon QuickSight to visualize token usage patterns. Use Amazon SageMaker Model Monitor to detect quality drift in generated summaries.
Reveal answer details
Close answer details
Correct answerC
ExplanationText output logging preserves invocation content for near real-time review, while a contextual grounding check in Amazon Bedrock Guardrails evaluates whether generated claims are supported and can identify hallucinations. CloudWatch anomaly detection on token metrics establishes expected usage patterns and raises early warnings when consumption, and therefore potential cost, becomes abnormal.
Question 24
Single choice
A hotel company wants to enhance a legacy Java-based property management system (PMS) by adding AI capabilities. The company wants to use Amazon Bedrock Knowledge Bases to provide staff with room availability information and hotel-specific details. The solution must maintain separate access controls for each hotel that the company manages. The solution must provide room availability information in near real time and must maintain consistent performance during peak usage periods. Which solution will meet these requirements?
-
A
Deploy a single Amazon Bedrock knowledge base that contains combined data for all hotels. Configure AWS Lambda functions to synchronize data from each hotel's PMS database through direct API connections. Implement AWS CloudTrail logging with hotel-specific filters to audit access logs for each hotel's data.
-
B
Create an Amazon EventBridge rule for each hotel that is invoked by changes to the PMS database. Configure the rule to send updates to a centralized Amazon Bedrock knowledge base in a management AWS account. Configure resource-based policies to enforce hotel-specific access controls.
-
C
Implement one Amazon Bedrock knowledge base for each hotel in a multi-account structure. Use direct data ingestion to provide near real-time room availability information. Schedule regular synchronization for less critical information.
-
D
Build a centralized Amazon Bedrock Agents solution that uses multiple knowledge bases. Implement AWS IAM Identity Center with hotel-specific permission sets to control staff access.
Reveal answer details
Close answer details
Correct answerC
ExplanationA separate Amazon Bedrock knowledge base for each hotel creates a clear data and access boundary, and the multi-account structure reinforces that isolation. Direct data ingestion carries room availability changes into the relevant knowledge base for near real-time queries. Regular synchronization is reserved for less critical hotel details, avoiding unnecessary real-time processing while keeping each hotel's corpus current.
Question 25
Single choice
A regulated company invokes Amazon Bedrock from private application subnets. The security team requires model traffic to stay on private AWS network paths, requests to use least-privilege authorization, and stored prompts to be encrypted with customer managed keys. Which design best satisfies these controls?
-
A
Route model calls through a public NAT gateway, and rely on HTTPS to satisfy all private connectivity requirements.
-
B
Use public model endpoints but restrict source IP addresses with an application allow list.
-
C
Disable model invocation logs so sensitive data is never written outside the application subnet.
-
D
Use AWS PrivateLink or VPC interface endpoints where supported, IAM policies scoped to required Bedrock actions, and AWS KMS customer managed keys for stored artifacts.
Reveal answer details
Close answer details
Correct answerD
ExplanationAWS PrivateLink or supported VPC interface endpoints provide a private network path from the application subnets to Bedrock without routing model traffic through a public NAT gateway. IAM policies limited to the necessary Bedrock actions enforce least privilege for requests. AWS KMS customer managed keys provide customer-controlled encryption for prompts and other artifacts that the application stores.
Question 26
Single choice
Several application components use models, knowledge bases, S3 data, and tools, but each component needs only a subset of those resources. Which access design best applies least privilege?
-
A
Give every component one shared execution role and limit access through instructions in the application prompt.
-
B
Give every component broad read access because read-only model and knowledge access cannot expose protected data.
-
C
Use one wildcard identity policy for all components and rely only on resource policies for environment separation.
-
D
Assign separate, narrowly scoped roles by component and environment, with compatible resource policies.
Reveal answer details
Close answer details
Correct answerD
ExplanationEach component should receive only the permissions needed for its own models, knowledge bases, S3 data, and tools. Separate narrowly scoped roles also preserve isolation between environments, while compatible resource policies permit the intended access from those roles. A shared or wildcard role expands the impact of a compromised component, and prompt instructions are not an authorization boundary.
|