Sandeep Dahake
Sandeep Dahake

Reputation: 188

Insufficient privileges for accessing data in S3

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:

There was an error with your dataset import

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.

Upvotes: 3

Views: 4044

Answers (1)

Manuel Jiménez
Manuel Jiménez

Reputation: 31

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/*"
        }
    ]
}

Upvotes: 3

Related Questions