I am trying to detect faces in an image using the AWS Image Rekognition API. But getting the following error:
Error1:
ClientError: An error occurred (InvalidS3ObjectException) when calling the DetectFaces operation: Unable to get image metadata from S3. Check object key, region and/or access permissions.
Python1 Code:
def detect_faces(object_name="path/to/image/001.jpg"):
client = get_aws_client('rekognition')
response = client.detect_faces(
Image={
'S3Object': {
'Bucket': "bucket-name",
'Name': object_name,
'Version': 'string'
}
},
Attributes=[
'ALL',
]
)
return response
The object "path / to / image / 001.jpg" exists in the "AWS S3 bucket" slave name. And the name of the area is also true.
Permissions for this object are "001.jpg": everyone is granted permission to "Open / Download / View". MetaData for object: Content-Type: image / jpeg
Not sure how to debug this. Any suggestion to resolve this please?
Thank,
source
share