Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 740
Sandeep Dahake Avatar asked Nov 01 '25 14:11

Sandeep Dahake


1 Answers

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/*"
        }
    ]
}
like image 96
Manuel Jiménez Avatar answered Nov 04 '25 05:11

Manuel Jiménez



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!