How do I resolve the "There was an error with your dataset import Insufficient privileges for accessing data in S3" error while creating an import job in Amazon Personalize?

Last updated: 2021-02-23

When I try to create the dataset import job in Amazon Personalize, I get the error "There was an error with your dataset import Insufficient privileges for accessing data in S3."

Resolution

This error can occur when Amazon Personalize can't read the data in the input bucket due to insufficient Amazon Simple Storage Service (Amazon S3) bucket permissions.

After you upload all the input CSV files to your S3 bucket, Amazon Personalize imports data from the input location. Therefore, Amazon Personalize needs permissions to access your S3 bucket.

To grant Amazon Personalize access to your S3 bucket, do the following:

1.    Open the Amazon S3 console.

2.    From the list of buckets, open the bucket in which you've uploaded the CSV files.

3.    Choose Permissions, and then choose Bucket Policy.

4.    In the Bucket policy editor text box, enter the following bucket policy:

{
 "Version": "2012-10-17",
 "Id": "PersonalizeS3BucketAccessPolicy",
 "Statement": [
 {
            "Sid": "PersonalizeS3BucketAccessPolicy",
            "Effect": "Allow",
            "Principal": {
                "Service": "personalize.amazonaws.com"
            },
            "Action": [
                "s3:GetObject",
                "s3:ListBucket"
            ],
            "Resource": [
                "arn:aws:s3:::DOC-EXAMPLE-BUCKET",
                "arn:aws:s3:::DOC-EXAMPLE_BUCKET/*"
            ]
        }
    ]
}

Note: Replace DOC-EXAMPLE-BUCKET with the name of your bucket.

5.    Choose Save.

For more information on setting up permissions to use Amazon Personalize, see Setting up permissions.


Did this article help?


Do you need billing or technical support?