简体   繁体   English

无法使用 CodeCommit 存储库启动 Sagemaker Notebook 实例

[英]Can't start Sagemaker Notebook Instance with a CodeCommit repo

I linked a repo in CodeCommit to Sagemaker.我将 CodeCommit 中的一个存储库链接到 Sagemaker。 However when I try to start an instance with that repo it fails and I get a message:但是,当我尝试使用该 repo 启动一个实例时,它失败了,我收到一条消息:

fatal: unable to access 'https://git-codecommit.us-east-1.amazonaws.com/v1/repos/MyRepo/': The requested URL returned error: 403

I think maybe it has something to do with the IAM role.我认为这可能与 IAM 角色有关。 Is there some policy I should add to the AmazonSageMaker-ExecutionRole.我应该向 AmazonSageMaker-ExecutionRole 添加一些策略吗? I am completely new to this so please excuse any incorrect usage of terms here.我对此完全陌生,所以请原谅此处对术语的任何不正确使用。

This is presumably caused by your IAM role;这大概是由您的 IAM 角色引起的; if you used the UI to create a role, I think by default, it creates a role requiring resources to have "sagemaker" in their ARN (Codecommit repos, S3 buckets...).如果您使用 UI 创建角色,我认为默认情况下,它会创建一个角色,要求资源在其 ARN(Codecommit 存储库、S3 存储桶...)中包含“sagemaker”。 So you have 2 options:所以你有两个选择:

  • Try renaming your repo eg "myrepo-sagemaker"尝试重命名您的仓库,例如“myrepo-sagemaker”
  • Or edit (ask your admin if you don't have the ability) your SM IAM role to be allowed to access MyRepo或编辑(如果您没有能力,请询问您的管理员)您的 SM IAM 角色以允许访问 MyRepo

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM