AIP-C01 免费试练题 · 考证匠讲解
题目
A developer is building a text-summarization application using Amazon Bedrock. During load testing, the application frequently encounters ThrottlingException errors from the Bedrock runtime API due to sporadic spikes in user traffic. The application logic is hosted on AWS Lambda using the AWS SDK for Python (Boto3). Which strategy provides the MOST resilient and cost-effective resolution to these errors without human intervention?
答案
答案 C。ThrottlingException 表示请求达到服务限制,固定间隔一起重试可能再次同时冲击。
拆题
- ThrottlingException 表示请求达到服务限制,固定间隔一起重试可能再次同时冲击。
- SDK adaptive mode 根据响应调节请求速率并退避,但仍需合适 client 隔离与超时。
- Lambda 内等待会占运行时长,若持续负载超配额,仍需排队、并发限制或容量规划。
每个选项为什么对、为什么错
- A:固定五秒重试可能所有调用同步再撞上限,没有 jitter 或动态控制。
- B:预置吞吐可能解决持续容量,但成本高且需提前采购,不是短时抖动的最低自动恢复路径。
- C(正确):SDK adaptive 模式提供请求速率与重试反馈调节,最贴合题中 sporadic spikes;实际支持与尝试数需明确配置。
- D:API Gateway client throttle 可帮助入口治理,但 usage plans 并非 Bedrock 成本/容量的精准硬上限,也未处理已发请求的 SDK 重试。
放到具体场景里
教学例子:Config(retries={"mode":"adaptive","total_max_attempts":4}) 作为配置示意,实际版本需验证。为不同模型限流资源使用独立 client,给 Lambda 总超时留预算,并对仍失败请求返回可重试状态或入队。不能在用户交互请求无限等待。
| 检查对象 | 本例条件或动作 | 结果与边界 |
|---|---|---|
| 错误 | ThrottlingException | 容量反馈 |
| 策略 | adaptive + 有限尝试 | 控制速率与退避 |
| 边界 | Lambda timeout / 队列 | 持续超载需规划 |
遇到同类题的判断顺序
- 分类错误:仅对可重试失败处理。
- 配置 SDK:有限尝试与超时。
- 隔离资源:避免一模型节流拖累全部 client。
- 观测压力:持续超载加入队列或容量方案。
结论:重试提高韧性,不创造容量,也不能无限延长请求。
参考资料
继续练这门考试
同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。
