我正在尝试从boto3.client.get_batch_prediction()下载输出文件。我想关键是OutputURI的文件名位,所以我在做客户端:
response = batch.get_batch_prediction()
if response['Status'] == 'COMPLETED':
key = response['OutputUri'][response['OutputUri'].find('Output_'):response['OutputUri'].find('.csv')+4]
s3 = boto3.resource('s3')
s3.meta.client.download_file(settings.AWS_S3_BUCKET_OUTPUT, key, '/tmp/hello.txt')
但这又回来了
调用HeadObject操作时出错(404):未找到
我认为这意味着文件不在那里。这意味着我的钥匙弄错了,那我该怎么找呢?
发布于 2017-03-22 21:08:53
我把钥匙弄错了。自我注意:仔细阅读文档。
https://stackoverflow.com/questions/42514883
复制相似问题