2017-08-21 137 views
0

awsの認識サービスを使用しようとしています。画像は正常に撮影され、S3にアップロードされました。しかし、いくつかのエンドポイントのURLのために認識を行うことができません。私はthisをチェックし、私の地域は正しいです。AWS S3 - エンドポイントURLに接続できません

エラーメッセージ:botocore.exceptions.EndpointConnectionError: Could not connect to the endpoint URL: "https://rekognition.us-east-2.amazonaws.com/"

docを通じて見て、私の終点はs3-us-east-2.amazonaws.comのようなものでなければならないことを知っています。

申し訳ありません私はこれに新しいです、間違いを指摘してください。事前のおかげで

パイソン

def detect_labels(bucket, key, max_labels=10, min_confidence=90, region="us- 
east-2"): 
    rekognition = boto3.client("rekognition",region) #tried change rekognition to s3 
    response = rekognition.detect_labels(
    Image={ 
     "S3Object": { 
     "Bucket": bucket, 
     "Name": key, 
     } 
     }, 
    MaxLabels=max_labels, 
    MinConfidence=min_confidence, 
) 
    return response['Labels'] 

takePhoto(file_path, file_name) 
uploadToS3(file_path,file_name, BUCKET,location) 
for label in detect_labels(BUCKET,file_name): 
    print("{Name} - {Confidence}%".format(**label)) 

答えて

0

アマゾンRekognitionは現在、三つの領域でのみ使用可能です:私たち-東-1、米国西部-2、およびEU-西-1。

http://docs.aws.amazon.com/general/latest/gr/rande.html#rekognition_region

あなたのバケットは、あなたがRekognitionを使用している領域に位置する必要があります。

+0

情報をお寄せいただきありがとうございます。 – aaa

関連する問題