Python AWS S3-无法连接到端点url
我正在尝试使用aws的识别服务。图像已成功拍摄并上载到S3。但是,由于某些端点url,无法进行识别。我检查了一下,我的区域是正确的 错误消息:Python AWS S3-无法连接到端点url,python,amazon-web-services,amazon-s3,Python,Amazon Web Services,Amazon S3,我正在尝试使用aws的识别服务。图像已成功拍摄并上载到S3。但是,由于某些端点url,无法进行识别。我检查了一下,我的区域是正确的 错误消息:botocore.exceptions.EndpointConnectionError:无法连接到终结点URL:https://rekognition.us-east-2.amazonaws.com/" 通过了解了解,我的终点应该是类似于s3-us-east-2.amazonaws.com 对不起,我是新手,请随时指出我犯的任何错误。提前谢谢 pytho
botocore.exceptions.EndpointConnectionError:无法连接到终结点URL:https://rekognition.us-east-2.amazonaws.com/"
通过了解了解,我的终点应该是类似于s3-us-east-2.amazonaws.com
对不起,我是新手,请随时指出我犯的任何错误。提前谢谢
python
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))
亚马逊Rekognion目前仅在三个地区提供:美国东部1号、美国西部2号和欧盟西部1号
您的铲斗需要位于您使用Rekognion的区域 亚马逊Rekognion目前仅在三个地区提供:美国东部1号、美国西部2号和欧盟西部1号
您的铲斗需要位于您使用Rekognion的区域 感谢您提供的信息,我们将相应更新。感谢您提供的信息,我们将相应更新。