AWS AIP-C01 开源练习 · 困难 · 第 03 套
英文原题与中文机器翻译。本批暂不提供日文题文;日语界面显示英文原文。
开源练习,非 AWS 官方试题。按作者参考答案判分,解析附官方文档链接。
An agent's AWS Lambda function must call a third-party API that requires a secret API key, which must be stored securely and rotated without code changes. Which service should hold the key?
代理的 AWS Lambda 函数必须调用需要秘密 API 密钥的第三方 API,该密钥必须安全存储并在不更改代码的情况下轮换。哪个服务应该掌握关键?
- A
AWS Secrets Manager.
AWS 秘密管理器。
- B
A plaintext environment variable committed to source control.
致力于源代码控制的纯文本环境变量。
- C
A hard-coded constant in the Lambda code.
Lambda 代码中的硬编码常量。
- D
An unencrypted object in a public S3 bucket.
公共 S3 存储桶中未加密的对象。
解析 / Explanation
正确答案 / Answer: A
A. Secrets Manager securely stores credentials, controls access via IAM, and supports rotation without changing application code.
B. Committing secrets to source control exposes them and provides no rotation.
C. Hard-coded secrets cannot be rotated safely and risk exposure.
D. Public, unencrypted storage of a secret is a serious vulnerability.
A. Secrets Manager 安全地存储凭证、通过 IAM 控制访问并支持轮换,而无需更改应用程序代码。
B. 将机密提交给源代码管理会暴露它们并且不提供轮换。
C. 硬编码的秘密无法安全地轮换并存在暴露的风险。
D. 公开的、未加密的秘密存储是一个严重的漏洞。
Security policy requires that a given IAM role be allowed to invoke only one specific approved foundation model in Amazon Bedrock and no others. How is this BEST enforced?
安全策略要求给定 IAM 角色只能调用 Amazon Bedrock 中一个特定的经批准的基础模型,而不能调用其他模型。这是如何最好地执行的?
- A
Write a least-privilege IAM policy that allows invoke actions only on the approved model's resource ARN.
编写一个最低权限 IAM 策略,仅允许对已批准模型的资源 ARN 调用操作。
- B
Allow all Bedrock models and remind developers to use only the approved one.
允许所有基岩模型并提醒开发者仅使用经批准的模型。
- C
Lower the temperature on the disallowed models.
降低不允许的型号上的温度。
- D
Rely on the application code to choose the right model.
依靠应用程序代码来选择正确的模型。
解析 / Explanation
正确答案 / Answer: A
A. Scoping the IAM policy to the specific model ARN enforces that the role can invoke only the approved model, following least privilege.
B. A broad allow with a verbal reminder does not technically restrict access.
C. Temperature does not restrict which models a role may call.
D. Application-side selection is not an access control and can be bypassed.
A. 将 IAM 策略的范围限定为特定模型 ARN,强制角色只能按照最低权限调用已批准的模型。
B. 带有口头提醒的广泛允许在技术上并不限制访问。
C. 温度不限制角色可以调用哪些模型。
D. 应用程序端选择不是访问控制,可以绕过。
A compliance team must ensure that customer prompts are processed only within an approved AWS Region and are not used to train the base foundation models. Which statement and configuration are correct?
合规团队必须确保客户提示仅在批准的 AWS 区域内处理,并且不用于训练基本基础模型。哪种说法和配置是正确的?
- A
Use Amazon Bedrock in the approved Region; Bedrock processes data in that Region and does not use your prompts or outputs to train the base models.
在批准的区域使用 Amazon Bedrock; Bedrock 处理该区域中的数据,并且不使用您的提示或输出来训练基础模型。
- B
You must file a support ticket or it will train on your data by default.
您必须提交支持票证,否则默认情况下它将根据您的数据进行训练。
- C
Data is always processed globally regardless of Region.
无论区域如何,数据始终在全球范围内处理。
- D
Only running your own self-hosted model can prevent base-model training on your data.
仅运行您自己的自托管模型可以防止对数据进行基础模型训练。
解析 / Explanation
正确答案 / Answer: A
A. Bedrock keeps inference data within the Region you call and does not use customer inputs/outputs to train base models, so selecting the approved Region meets the requirement.
B. Bedrock does not use your inputs/outputs to train base models, so no opt-out ticket is required for that.
C. Bedrock processes your inference data in the Region where you invoke the model, not globally.
D. Using Bedrock already prevents your data from training the base models; self-hosting is not required for that guarantee.
A. Bedrock 将推理数据保留在您调用的区域内,并且不使用客户输入/输出来训练基础模型,因此选择批准的区域即可满足要求。
B. Bedrock 不会使用您的输入/输出来训练基本模型,因此不需要选择退出票证。
C. Bedrock 在您调用模型的区域(而不是全局)处理您的推理数据。
D. 使用 Bedrock 已经可以防止您的数据训练基础模型;该保证不需要自托管。
A team needs to filter harmful content (hate, insults, violence, sexual content, and misconduct) in both prompts and responses, with adjustable strictness per category. Which Amazon Bedrock Guardrails feature provides this?
团队需要过滤提示和响应中的有害内容(仇恨、侮辱、暴力、性内容和不当行为),并按类别调整严格程度。哪个 Amazon Bedrock Guardrails 功能可以提供此功能?
- A
Content filters with configurable strength thresholds per harmful category.
每个有害类别具有可配置强度阈值的内容过滤器。
- B
Stop sequences.
停止序列。
- C
Lowering the temperature.
降低温度。
- D
Provisioned Throughput.
预置吞吐量。
解析 / Explanation
正确答案 / Answer: A
A. Guardrails content filters detect and block harmful categories in input and output, with adjustable filter strengths per category.
B. Stop sequences end generation at a phrase; they do not classify or block harmful categories.
C. Temperature does not filter harmful content.
D. Provisioned Throughput is a capacity feature, unrelated to content filtering.
A. Guardrails 内容过滤器可检测并阻止输入和输出中的有害类别,并且每个类别的过滤器强度均可调整。
B. 停止序列在短语处结束生成;它们不会对有害类别进行分类或阻止。
C. 温度不会过滤有害内容。
D. 预配置吞吐量是一项容量功能,与内容过滤无关。
A banking assistant must never discuss a specific prohibited subject (for example, giving individualized investment advice), even when users phrase the request in new ways. Which Guardrails feature is designed for this?
银行助理绝不能讨论特定的禁止主题(例如,提供个性化的投资建议),即使用户以新的方式表达请求。哪些护栏功能是为此设计的?
- A
Denied topics, defined with a description and examples so the guardrail blocks that subject.
拒绝的主题,使用描述和示例进行定义,以便护栏阻止该主题。
- B
Increasing max tokens.
增加最大令牌。
- C
A higher temperature.
温度较高。
- D
A larger context window.
更大的上下文窗口。
解析 / Explanation
正确答案 / Answer: A
A. Denied topics let you define subjects to block by description and examples, so the guardrail refuses related requests regardless of phrasing.
B. Output length does not block a subject.
C. Temperature does not enforce topic restrictions.
D. Context size does not prevent a prohibited topic from being discussed.
A. 拒绝主题允许您通过描述和示例定义要阻止的主题,因此无论措辞如何,护栏都会拒绝相关请求。
B. 输出长度不会遮挡主题。
C. 温度不强制执行主题限制。
D. 上下文大小并不妨碍讨论禁止的主题。
An assistant must ensure that any personally identifiable information appearing in model responses is masked or blocked before reaching users. Which Guardrails capability addresses this?
助理必须确保模型响应中出现的任何个人身份信息在到达用户之前都被屏蔽或阻止。哪种 Guardrails 功能可以解决这个问题?
- A
The sensitive information (PII) filter, which can mask or block PII in inputs and outputs.
敏感信息 (PII) 过滤器,可以屏蔽或阻止输入和输出中的 PII。
- B
Stop sequences on names.
停止名称序列。
- C
Lowering the temperature.
降低温度。
- D
A custom font in the UI.
UI 中的自定义字体。
解析 / Explanation
正确答案 / Answer: A
A. Guardrails can detect PII and either mask it (for example, redact) or block the response, protecting users from exposure.
B. Stop sequences cannot reliably detect and redact varied PII entities.
C. Temperature does not detect or mask PII.
D. Presentation styling does not remove PII from the content.
A. Guardrails 可以检测 PII 并对其进行屏蔽(例如,编辑)或阻止响应,从而保护用户免遭暴露。
B. 停止序列无法可靠地检测和编辑各种 PII 实体。
C. 温度不会检测或掩盖 PII。
D. 演示文稿样式不会从内容中删除 PII。
A public chatbot is targeted by users trying to override its instructions and extract restricted behavior. Which Amazon Bedrock Guardrails capability specifically helps detect these attempts?
公共聊天机器人是试图超越其指令并提取受限行为的用户的目标。 Amazon Bedrock Guardrails 的哪些功能专门帮助检测这些尝试?
- A
The prompt attack filter, which detects prompt injection and jailbreak attempts.
提示攻击过滤器,检测提示注入和越狱尝试。
- B
Increasing the temperature to confuse attackers.
提高温度以迷惑攻击者。
- C
Adding more few-shot examples of jokes.
添加更多笑话的小镜头示例。
- D
Switching to batch inference.
切换到批量推理。
解析 / Explanation
正确答案 / Answer: A
A. Guardrails include a prompt attack filter that flags prompt injection and jailbreak inputs so they can be blocked.
B. Temperature does not detect or stop prompt attacks.
C. Unrelated examples do not provide injection detection.
D. Batch inference is a serving mode and does not detect prompt attacks.
A. 护栏包括一个提示攻击过滤器,可以标记提示注入和越狱输入,以便可以阻止它们。
B. 温度不能检测或阻止即时攻击。
C. 不相关的示例不提供注入检测。
D. 批量推理是一种服务模式,不检测即时攻击。
A company runs a self-managed RAG pipeline and even calls a model hosted outside Amazon Bedrock, but it wants to apply the same Bedrock guardrail policies to arbitrary text at chosen points in the flow. Which capability enables this?
一家公司运行自我管理的 RAG 管道,甚至调用 Amazon Bedrock 外部托管的模型,但它希望将相同的 Bedrock 护栏策略应用于流程中选定点的任意文本。哪种能力可以实现这一点?
- A
The ApplyGuardrail API, which evaluates text against a guardrail independently of a model invocation.
ApplyGuardrail API,它独立于模型调用根据护栏评估文本。
- B
Only inline guardrails on Bedrock InvokeModel.
Bedrock InvokeModel 上仅内联护栏。
- C
Raising the temperature.
提高温度。
- D
Provisioned Throughput.
预置吞吐量。
解析 / Explanation
正确答案 / Answer: A
A. ApplyGuardrail lets you assess input or output text against a guardrail at any point, including content from models not hosted in Bedrock.
B. Inline-only guardrails would not cover text from external models or arbitrary pipeline points, which ApplyGuardrail handles.
C. Temperature is unrelated to applying guardrail policies.
D. Provisioned Throughput is a capacity feature, not a guardrail evaluation API.
A. ApplyGuardrail 可让您随时根据护栏评估输入或输出文本,包括来自未托管在 Bedrock 中的模型的内容。
B. 仅内联护栏不会覆盖来自ApplyGuardrail 处理的外部模型或任意管道点的文本。
C. 温度与应用护栏政策无关。
D. 预置吞吐量是一项容量功能,而不是护栏评估 API。
In a RAG assistant, the team wants the guardrail itself to block responses that are not supported by the retrieved source or that stray from the user's query, using a tunable threshold. Which Guardrails capability fits?
在 RAG 助手中,团队希望护栏本身使用可调阈值来阻止检索源不支持的响应或偏离用户查询的响应。哪种护栏功能适合?
- A
The contextual grounding and relevance checks, with configurable thresholds.
上下文基础和相关性检查,具有可配置的阈值。
- B
Denied topics only.
仅拒绝主题。
- C
Stop sequences.
停止序列。
- D
A larger model temperature.
较大的模型温度。
解析 / Explanation
正确答案 / Answer: A
A. Guardrails contextual grounding and relevance checks score whether a response is grounded in the source and relevant to the query, and can block low-scoring responses based on thresholds you set.
B. Denied topics block subjects but do not measure grounding in the retrieved source.
C. Stop sequences end generation and cannot assess grounding.
D. Temperature does not assess or enforce grounding.
A. Guardrails 上下文基础和相关性检查对响应是否基于源以及与查询相关进行评分,并且可以根据您设置的阈值阻止低分响应。
B. 被拒绝的主题会阻止主题,但不会衡量检索到的来源的基础。
C. 停止序列结束生成并且无法评估接地。
D. 温度不评估或强制接地。
A regulated insurer needs strong assurance that policy-related answers conform to its written rules, with verifiable checks rather than only probabilistic filtering. Which newer Amazon Bedrock Guardrails capability is designed to mathematically verify outputs against encoded policies?
受监管的保险公司需要强有力的保证,确保保单相关的答案符合其书面规则,并进行可验证的检查,而不仅仅是概率过滤。哪种较新的 Amazon Bedrock Guardrails 功能旨在根据编码策略以数学方式验证输出?
- A
Automated Reasoning checks.
自动推理检查。
- B
Increasing the temperature.
提高温度。
- C
Stop sequences.
停止序列。
- D
Provisioned Throughput.
预置吞吐量。
解析 / Explanation
正确答案 / Answer: A
A. Automated Reasoning checks use formal, logic-based verification against an encoded policy to validate whether responses are consistent with the rules, reducing factual errors in regulated domains.
B. Temperature does not verify outputs against policy.
C. Stop sequences end generation; they do not verify policy conformance.
D. Provisioned Throughput is a capacity feature, not a verification capability.
A. 自动推理检查使用针对编码策略的基于逻辑的正式验证来验证响应是否与规则一致,从而减少受监管领域中的事实错误。
B. 温度不会根据策略验证输出。
C. 停止序列结束生成;他们不验证策略的一致性。
D. 预置吞吐量是一项容量功能,而不是验证功能。
A financial firm must store generated compliance records so they cannot be altered or deleted for a mandated retention period, even by administrators. Which configuration meets this requirement?
金融公司必须存储生成的合规记录,以便在规定的保留期内无法更改或删除这些记录,即使是管理员也是如此。哪种配置可以满足这个要求?
- A
Store records in Amazon S3 with Object Lock in compliance mode for the required retention period.
在合规模式下使用对象锁定在 Amazon S3 中存储记录所需的保留期。
- B
Store records in a standard S3 bucket and ask staff not to delete them.
将记录存储在标准 S3 存储桶中,并要求员工不要删除它们。
- C
Keep records only in application memory.
仅将记录保留在应用程序内存中。
- D
Use S3 versioning alone without Object Lock.
单独使用 S3 版本控制,无需对象锁定。
解析 / Explanation
正确答案 / Answer: A
A. S3 Object Lock compliance mode enforces write-once-read-many (WORM) immutability so objects cannot be modified or deleted, even by the root user, until retention expires.
B. A policy request does not technically prevent modification or deletion.
C. In-memory storage is volatile and provides no durable, immutable retention.
D. Versioning preserves prior versions but does not prevent deletion or enforce a compliance retention lock.
A. S3 对象锁定合规模式强制执行一次写入多次读取 (WORM) 不变性,因此在保留到期之前,即使是 root 用户也无法修改或删除对象。
B. 策略请求在技术上并不能阻止修改或删除。
C. 内存存储是易失性的,并且不提供持久、不可变的保留。
D. 版本控制会保留以前的版本,但不会阻止删除或强制执行合规性保留锁定。
An auditor must determine which IAM principals called which Amazon Bedrock APIs, and when, across the account. Which service provides this audit trail?
审核员必须确定整个账户中哪些 IAM 委托人调用了哪些 Amazon Bedrock API 以及何时调用。哪个服务提供此审计跟踪?
- A
AWS CloudTrail.
AWS CloudTrail。
- B
Amazon CloudWatch dashboards only.
仅限 Amazon CloudWatch 控制面板。
- C
Amazon Macie.
亚马逊麦西.
- D
Amazon Comprehend.
亚马逊理解。
解析 / Explanation
正确答案 / Answer: A
A. CloudTrail records API calls including the principal, action, time, and source, providing the management/audit trail of who did what.
B. Dashboards visualize metrics but do not provide the per-call identity and action audit trail.
C. Macie classifies sensitive data; it does not record API caller identity and actions.
D. Comprehend analyzes text and is not an API audit service.
A. CloudTrail 记录 API 调用,包括主体、操作、时间和来源,提供谁做了什么的管理/审计跟踪。
B. 仪表板可视化指标,但不提供每次调用的身份和操作审计跟踪。
C. Macie 对敏感数据进行分类;它不记录 API 调用者身份和操作。
D. Comprehend 分析文本,不是 API 审核服务。
For regulatory reconstruction, a company must retain the actual prompt content and model responses (not just API metadata) for every Bedrock call, in immutable storage. Which combination meets this?
对于监管重建,公司必须在不可变存储中保留每个 Bedrock 调用的实际提示内容和模型响应(而不仅仅是 API 元数据)。哪种组合符合这个要求?
- A
Enable Amazon Bedrock model invocation logging to Amazon S3 and apply S3 Object Lock for the retention period.
启用 Amazon Bedrock 模型调用日志记录到 Amazon S3 并在保留期内应用 S3 对象锁定。
- B
Enable AWS CloudTrail alone.
单独启用 AWS CloudTrail。
- C
Print prompts to the application console only.
仅将提示打印到应用程序控制台。
- D
Rely on CloudWatch metrics for content.
依赖 CloudWatch 内容指标。
解析 / Explanation
正确答案 / Answer: A
A. Invocation logging captures full prompt and response content, and Object Lock makes the stored logs immutable for the mandated retention.
B. CloudTrail captures API metadata, not the full prompt and response content required for reconstruction.
C. Console output is not durable, complete, or immutable for compliance.
D. Metrics are numeric aggregates and do not store prompt or response text.
A. 调用日志记录捕获完整的提示和响应内容,对象锁定使存储的日志不可变,以实现强制保留。
B. CloudTrail 捕获 API 元数据,而不是重建所需的完整提示和响应内容。
C. 控制台输出不是持久的、完整的或不可变的以保证合规性。
D. 指标是数字聚合,不存储提示或响应文本。
A company wants to keep customer chat transcripts for analytics but must comply with privacy rules that prohibit retaining personally identifiable information. What is the BEST approach before storing the transcripts?
一家公司希望保留客户聊天记录用于分析,但必须遵守禁止保留个人身份信息的隐私规则。存储成绩单之前最好的方法是什么?
- A
Redact PII from the transcripts with Amazon Comprehend before storing the sanitized text.
在存储经过清理的文本之前,使用 Amazon Comprehend 从记录中编辑 PII。
- B
Store the raw transcripts unchanged for completeness.
为了完整性,存储原始转录本不变。
- C
Raise the model temperature to obscure PII.
提高模型温度以掩盖 PII。
- D
Encrypt the bucket and keep all PII indefinitely.
加密存储桶并无限期保留所有 PII。
解析 / Explanation
正确答案 / Answer: A
A. Detecting and redacting PII with Comprehend before storage lets the company keep useful analytics data while complying with privacy requirements.
B. Storing raw PII violates the privacy requirement.
C. Temperature does not remove PII from stored text.
D. Encryption protects data at rest but does not satisfy a rule against retaining PII at all.
A. 在存储之前使用 Comprehend 检测和编辑 PII,使公司能够保留有用的分析数据,同时遵守隐私要求。
B. 存储原始 PII 违反了隐私要求。
C. 温度不会从存储的文本中删除 PII。
D. 加密可以保护静态数据,但根本不满足保留 PII 的规则。
Stored embeddings and invocation logs contain sensitive business data, and the security team must control and audit the encryption keys used to protect them at rest. Which approach should they adopt?
存储的嵌入和调用日志包含敏感的业务数据,安全团队必须控制和审核用于静态保护它们的加密密钥。他们应该采取哪种方法?
- A
Encrypt the data with AWS KMS customer managed keys and restrict and audit key usage via key policies and CloudTrail.
使用 AWS KMS 客户管理的密钥加密数据,并通过密钥策略和 CloudTrail 限制和审核密钥的使用。
- B
Leave the data unencrypted to simplify access.
保持数据未加密以简化访问。
- C
Use a single shared password stored in code.
使用存储在代码中的单个共享密码。
- D
Make the storage public so keys are unnecessary.
将存储公开,这样就不需要密钥了。
解析 / Explanation
正确答案 / Answer: A
A. Customer managed KMS keys give the team control over rotation and access, and CloudTrail records key usage for auditing.
B. Unencrypted sensitive data fails the data-protection requirement.
C. A hard-coded shared secret is insecure and not an auditable managed key.
D. Public storage exposes the sensitive data and is the opposite of the requirement.
A. 客户管理的 KMS 密钥使团队能够控制轮换和访问,CloudTrail 记录密钥使用情况以供审核。
B. 未加密的敏感数据不符合数据保护要求。
C. 硬编码的共享密钥是不安全的,并且不是可审计的托管密钥。
D. 公共存储暴露了敏感数据,与要求相反。