Step 2: Set up Amazon Rekognition Custom Labels console permissions - Rekognition

Step 2: Set up Amazon Rekognition Custom Labels console permissions

To use the Amazon Rekognition console you need add to have appropriate permissions. If you want to store your training files in a bucket other than the console bucket, you need additional permissions.

Allowing console access

To use the Amazon Rekognition Custom Labels console, you need the following IAM policy that covers Amazon S3, SageMaker Ground Truth, and Amazon Rekognition Custom Labels. For information about assigning permissions, see Assigning permissions.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:ListAllMyBuckets" ], "Resource": "*" }, { "Sid": "s3Policies", "Effect": "Allow", "Action": [ "s3:ListBucket", "s3:CreateBucket", "s3:GetBucketAcl", "s3:GetBucketLocation", "s3:GetObject", "s3:GetObjectAcl", "s3:GetObjectVersion", "s3:GetObjectTagging", "s3:GetBucketVersioning", "s3:GetObjectVersionTagging", "s3:PutBucketCORS", "s3:PutLifecycleConfiguration", "s3:PutBucketPolicy", "s3:PutObject", "s3:PutObjectTagging", "s3:PutBucketVersioning", "s3:PutObjectVersionTagging" ], "Resource": [ "arn:aws:s3:::custom-labels-console-*" ] }, { "Sid": "rekognitionPolicies", "Effect": "Allow", "Action": [ "rekognition:*" ], "Resource": "*" }, { "Sid": "groundTruthPolicies", "Effect": "Allow", "Action": [ "groundtruthlabeling:*" ], "Resource": "*" } ] }

Accessing external Amazon S3 Buckets

When you first open the Amazon Rekognition Custom Labels console in a new AWS Region, Amazon Rekognition Custom Labels creates a bucket (console bucket) that's used to store project files. Alternatively, you can use your own Amazon S3 bucket (external bucket) to upload the images or manifest file to the console. To use an external bucket, add the following policy block to the preceding policy. Replace my-bucket with the name of the bucket.

{ "Sid": "s3ExternalBucketPolicies", "Effect": "Allow", "Action": [ "s3:GetBucketAcl", "s3:GetBucketLocation", "s3:GetObject", "s3:GetObjectAcl", "s3:GetObjectVersion", "s3:GetObjectTagging", "s3:ListBucket", "s3:PutObject" ], "Resource": [ "arn:aws:s3:::my-bucket*" ] }

Assigning permissions

To provide access, add permissions to your users, groups, or roles: