AWS Rekognition和S3存储桶区域 [英] AWS rekognition and s3 bucket region
问题描述
尝试通过aws rekognition访问我的s3存储桶时出现以下错误:
I am getting the following error when trying to access my s3 bucket with aws rekognition:
message: 'Unable to get object metadata from S3. Check object key, region and/or access permissions.',
我的直觉是这与该地区有关.
My hunch is it has something to do with the region.
这是代码:
const config = require('./config.json');
const AWS = require('aws-sdk');
AWS.config.update({region:config.awsRegion});
const rekognition = new AWS.Rekognition();
var params = {
"CollectionId": config.awsFaceCollection
}
rekognition.createCollection(params, function(err, data) {
if (err) {
console.log(err, err.stack);
}
else {
console.log('Collection created'); // successful response
}
});
这是我的配置文件:
{
"awsRegion":"us-east-1",
"s3Bucket":"daveyman123",
"lexVoiceId":"justin",
"awsFaceCollection":"raspifacecollection6"
}
我几乎将所有权限授予了我能想到的用户.s3存储桶的区域也似乎位于可以识别的位置.我该怎么办?
I have given almost all the permissions to the user I can think of. Also the region for the s3 bucket appears to be in a place that can work with rekognition. What can I do?
推荐答案
存在相同的问题,解决方案是对Rekognition API和S3存储桶使用相同的区域,如果使用Role,请确保其具有拥有访问S3和Rekognition的适当权限.
Was having the same issue and the solution was to to use the same region for the Rekognition API and S3 bucket, and if using a Role make sure that it has proper permissions to access both S3 and Rekognition.
这篇关于AWS Rekognition和S3存储桶区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!