SAP-C02 学习助手

SAP-C02 第 285 题

API Gateway Lambda DynamoDB CloudFront EBS

题目

A company hosts a blog post application on AWS using Amazon API Gateway, Amazon DynamoDB, and AWS Lambda. The application currently does not use API keys to authorize requests. The API model is as follows: GET /posts/{postId}: to get post details GET /users/{userId}: to get user details GET /comments/{commentId}: to get comments details The company has noticed users are actively discussing topics in the comments section, and the company wants to increase user engagement by making the comments appear in real time. Which design should be used to reduce comment latency and improve user experience?

中文翻译:
一家公司使用 Amazon API Gateway、Amazon DynamoDB 和 AWS Lambda 在 AWS 上托管博客文章应用程序。该应用程序当前不使用 API 密钥来授权请求​​。 API 模型如下: GET /posts/{postId}:获取帖子详细信息 GET /users/{userId}:获取用户详细信息 GET /comments/{commentId}:获取评论详细信息 公司注意到用户在评论部分积极讨论主题,公司希望通过实时显示评论来提高用户参与度。应该采用哪种设计来减少评论延迟并提高用户体验?

选项

A. Use edge-optimized API with Amazon CloudFront to cache API responses.

中文翻译:
将边缘优化的 API 与 Amazon CloudFront 结合使用来缓存 API 响应。

B. Modify the blog application code to request GET/comments/{commentId} every 10 seconds.

中文翻译:
修改博客应用程序代码,每 10 秒请求一次 GET/comments/{commentId}。

C. Use AWS AppSync and leverage WebSockets to deliver comments.

中文翻译:
使用 AWS AppSync 并利用 WebSocket 来提供评论。

D. Change the concurrency limit of the Lambda functions to lower the API response time.

中文翻译:
更改 Lambda 函数的并发限制以缩短 API 响应时间。

答案

C

解析

正确答案:C 解析: 本题应选择 C。 正确选项: C. 使用 AWS AppSync 并利用 WebSocket 来提供评论。 选择理由: 该选项最直接地满足题干中的关键约束。做 SAP-C02 题目时,需要同时对照题干里的限定词,例如最高性能、最低运维开销、成本效益、可靠性、可扩展性、安全性、RTO/RPO、合规要求等。本题相关考点主要包括:API Gateway、Lambda、DynamoDB、CloudFront、EBS。 排除...

登录后查看完整解析