Is rekonition Services Region Specific

0

Greetings, I'm in Canada doing my AWS thing in ca-central-1. My s3 bucket is in ca-central-1. I want to use rekognition.detect_labels in a python script with Boto3 installed and calling the correct profile (default in my case). In looking at Rekognition from my console, when in the region ca-central-1, i see demos for facial analysis and facial comparison. Going to Virginia or another US region, all of the other aspects of Rekognition appear on the left side menu such as Label Detection. In Canada, am I restricted to just the facial functionality?

This is the python script: """ aws test code""" import boto3

Replace with your AWS Region

rekognition = boto3.client('rekognition', region_name='ca-central-1')

Path to local image

IMAGE_PATH = 'rome.jpg' with open(IMAGE_PATH, 'rb') as image: response = rekognition.detect_labels( Image={'Bytes': image.read()}, MaxLabels=1 ) print('Detected labels in ' + IMAGE_PATH)

This is the error: Traceback (most recent call last): File "/Users/ricksegal/Downloads/bototest.py", line 11, in <module> response = rekognition.detect_labels( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/botocore/client.py", line 553, in _api_call return self._make_api_call(operation_name, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/botocore/client.py", line 1009, in _make_api_call raise error_class(parsed_response, operation_name) botocore.errorfactory.AccessDeniedException: An error occurred (AccessDeniedException) when calling the DetectLabels operation

The IAM user has Rekognition full access as well as specific policy to all rekognition:DetectLabels

thanks in advance,

Rick

profile picture
質問済み 2ヶ月前507ビュー
1回答
1
承認された回答

Hello.

As you can see from the document below, there are differences in the features available depending on the region.
This means that there are some features that are not yet supported on "ca-central-1".
If you want to use all the functions, I think there is basically no problem if you select "us-east-1".
https://docs.aws.amazon.com/general/latest/gr/rekognition.html

These operations are only available through use of the AWS CLI or SDK, as the Canada (Central) Region doesn't currently provide a console experience for these operations.

a

profile picture
エキスパート
回答済み 2ヶ月前
profile picture
エキスパート
レビュー済み 1ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前
profile picture
エキスパート
レビュー済み 2ヶ月前
  • Thanks. It is always the simple things. This did, indeed, solve the problem. Thank you.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ