user379888
user379888

Reputation:

Insufficient privileges for accessing data in S3 - AWS

I have been trying to access S3 resource to use in AWS Personalize. Whenever I try, I get below error. I have read this question and created policy for S3.

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 bucket policy on personalize123.

AWS Bucket Permissions:

{
    "Version": "2012-10-17",
    "Id": "Policy1584771703282",
    "Statement": [
        {
            "Sid": "Stmt1584771695535",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::289126069598:root"
            },
            "Action": "s3:*",
            "Resource": "arn:aws:s3:::personalize123/ratings.csv"
        }
    ]
}

Upvotes: 1

Views: 961

Answers (1)

Richard Rublev
Richard Rublev

Reputation: 8164

Amazon Personalize needs permission to access the S3 bucket. You must enable ListBucket nad GetObject actions. Try to edit this

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

Read Uploading to an S3 Bucket

Upvotes: 2

Related Questions