无法访问S3中的数据

无法访问S3中的数据

本文介绍了权限不足,无法访问S3中的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在入门(控制台)-Amazon SageMaker上的推荐引擎的Amazon Personalize .导入User-item交互数据时,出现以下错误:

I am following the tutorial on Getting Started (Console) - Amazon Personalize of the recommendation engine on Amazon SageMaker.When importing User-item interaction data, I got the following error:

权限不足,无法在S3中访问数据.请查看 https://docs.aws.amazon.com/personalize/latest/dg/getting-started.html#gs-upload-to-bucket 并在recommendation123上修复存储桶策略.

Insufficient privileges for accessing data in S3. Please look at https://docs.aws.amazon.com/personalize/latest/dg/getting-started.html#gs-upload-to-bucket and fix the bucket policy on recommendation123.

我尝试了不同的存储桶策略,但是都不允许导入数据.

I have tried different bucket policies but none of them is allowing to import the data.

用户与物品的交互数据标志应从失败"变为活动".

The user-item interaction data flag should change from failed to active.

推荐答案

您需要在存储桶策略中(而不是在角色中)设置列表并获取存储桶的权限.

You need to set list and get permissions to your bucket, in a bucket policy, not in the role.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "personalize.amazonaws.com"
            },
            "Action": "s3:ListBucket",
            "Resource": "arn:aws:s3:::bucket-dev-personalize"
        },
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "personalize.amazonaws.com"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::bucket-dev-personalize/*"
        }
    ]
}

这篇关于权限不足,无法访问S3中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-15 03:17