创建笔记本时,出现“服务角色无权访问 LocationUri {}”错误

时间:2021-01-28 16:48:22

标签: amazon-web-services jupyter-notebook amazon-emr

当我创建 AWS EMR Notebook 时,出现以下错误。服务角色是 EMR_Notebook_DefaultRole。

Service role does not have permission to access the LocationUri {}

根本原因是什么?非常感谢!

2 个答案:

答案 0 :(得分:0)

您在 jupyter 中的角色无法访问计划存储笔记本的 s3 位置。

您可以修改此笔记本在创建时显示的 s3 存储桶的策略。

尝试将其更改为类似的内容

   {
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::632293491421:role/EMR_DefaultRole"
            },
            "Action": [
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::aws-emr-resources-632293491421-eu-west-1"
            ]
        },
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::632293491421:role/EMR_DefaultRole"
            },
            "Action": [
                "s3:PutObject",
                "s3:GetObject",
                "s3:DeleteObject"
            ],
            "Resource": [
                "arn:aws:s3:::aws-emr-resources-632293491421-eu-west-1/*"
            ]
        }
    ]
}

确保您使用正确的数字代替 632293491421,这将显示在您的存储桶中

答案 1 :(得分:0)

在创建笔记本时选择“EMR_Notebooks_DefaultRole”角色

这张图片可能对你有帮助:

EMR Notebbook

相关问题