Uncheck Block Public Access settings for this bucket checkbox.
aws rekognition create-collection --collection-id iDevelopKnownFaces
Cognito
. We will see 2 Roles Cognito_FaceRecognitionAuth_Role and Cognito_FaceRecognitionUnauth_Role of Cognito Identity Pool that we created in the previous step, we will edit the policy of these 2 Roles.{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"rekognition:DetectLabels",
"mobileanalytics:PutEvents",
"cognito-sync:*",
"cognito-identity:*"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"rekognition:CreateCollection",
"rekognition:DeleteCollection",
"rekognition:IndexFaces",
"dynamodb:Scan",
"dynamodb:Query",
"dynamodb:UpdateItem",
"rekognition:SearchFacesByImage"
],
"Resource": [
"arn:aws:s3:::facerecognitions3bucket/*",
"arn:aws:dynamodb:<YOUR_REGION>:<ACCOUNT_ID>:table/facerecognition",
"arn:aws:rekognition:<YOUR_REGION>:<ACCOUNT_ID>:collection/iDevelopKnownFaces"
]
}
]
}
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"rekognition:DetectLabels",
"mobileanalytics:PutEvents",
"cognito-sync:*",
"cognito-identity:*"
],
"Resource": "*"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"rekognition:CreateCollection",
"rekognition:DeleteCollection",
"rekognition:IndexFaces",
"dynamodb:Scan",
"dynamodb:Query",
"dynamodb:UpdateItem",
"rekognition:SearchFacesByImage"
],
"Resource": [
"arn:aws:s3:::facerecognitions3bucket/*",
"arn:aws:dynamodb:<YOUR_REGION>:<ACCOUNT_ID>:table/facerecognition",
"arn:aws:rekognition:<YOUR_REGION>:<ACCOUNT_ID>:collection/iDevelopKnownFaces"
]
}
]
}