MLS-C01 练习题

MLS-C01 题目讲解:私网 API 不等于私网 notebook 登录

MLS-C01 练习题讲解。答案 B。interface endpoint 限制 API 调用路径,但 notebook 的 presigned URL 是另一条访问入口。

MLS-C01 免费试练题 · 考证匠讲解

题目

A company provisions Amazon SageMaker notebook instances for its data science team and creates Amazon VPC interface endpoints to ensure communication between the VPC and the notebook instances. All connections to the Amazon SageMaker API are contained entirely and securely using the AWS network. However, the data science team realizes that individuals outside the VPC can still connect to the notebook instances across the internet. Which set of actions should the data science team take to fix the issue?

A. Modify the notebook instances' security group to allow traffic only from the CIDR ranges of the VPC. Apply this security group to all of the notebook instances' VPC interfaces.
B. Create an IAM policy that allows the sagemaker:CreatePresignedNotebooklnstanceUrl and sagemaker:DescribeNotebooklnstance actions from only the VPC endpoints. Apply this policy to all IAM users, groups, and roles used to access the notebook instances.
C. Add a NAT gateway to the VPC. Convert all of the subnets where the Amazon SageMaker notebook instances are hosted to private subnets. Stop and start all of the notebook instances to reassign only private IP addresses.
D. Change the network ACL of the subnet the notebook is hosted in to restrict access to anyone outside the VPC.

答案

答案 B。interface endpoint 限制 API 调用路径,但 notebook 的 presigned URL 是另一条访问入口。

拆题

  • interface endpoint 限制 API 调用路径,但 notebook 的 presigned URL 是另一条访问入口。
  • 控制生成 URL 的 IAM 权限和来源条件,避免公网身份获取登录链接。
  • 已有 presigned URL 的生命周期与服务访问路径还要核对;仅改 SG 或 subnet 不等于堵住托管 Web 登录。

每个选项为什么对、为什么错

  • A:notebook VPC interface SG 管客户 VPC 通信,不全面约束托管 presigned Web 入口。
  • B(正确):对创建 URL 等操作加 aws:SourceVpce 条件,限制受授权入口,是题目对应控制层。
  • C:NAT 提供出站网络,不阻止互联网用户获取并访问签名登录 URL。
  • D:NACL 控子网流量,不替代托管服务登录入口 IAM 检查。

放到具体场景里

教学例子:内部用户经批准的 vpce 调用 CreatePresignedNotebookInstanceUrl 成功,公网来源同一用户调用被拒。还需检查是否有另一份 Allow policy 绕过条件,以及 URL 转发风险;不能认为仅一个 Allow 条件就无条件限制所有权限组合。

检查对象本例条件或动作结果与边界
服务 APIinterface endpoint私网调用路径
登录 URLIAM SourceVpce 条件控制签发入口
会话URL 与已有登录单独检查有效期

遇到同类题的判断顺序

  1. 列出入口:区分 API 与 Web 登录。
  2. 限制签发:按来源与身份收紧策略。
  3. 测试公网:生成链接请求应被拒。
  4. 复查会话:核对已有 URL 与权限组合。
结论:私网端点保护某条路径,不代表产品所有入口自动私有化。

参考资料

继续练这门考试

同一门考试的免费试练题都附这样的完整讲解,做完再看讲解。