0

我正在使用 boto3 和我的烧瓶应用程序将文件上传到 s3 存储桶中,并使用服务器端加密客户提供的密钥。我从加密的 s3 文件中尝试了 start_transcription_job 但我有一个例外

s3_client.upload_file(filename, BUCKET, s3filename, ExtraArgs={'SSECustomerKey': KEY, 'SSECustomerAlgorithm': 'AES256' })

transcribe_obj.start_transcription_job(
     TranscriptionJobName=job_name,
     Media={'MediaFileUri': s3uri},
     MediaFormat=file_extension,
     LanguageCode='en-US'
)

例外:

botocore.errorfactory.BadRequestException: An error occurred (BadRequestException) when calling the StartTranscriptionJob operation: The S3 URI that you provided can't be accessed. Make sure your URI is valid and try your request again.
4

1 回答 1

0

使用服务器端加密和客户提供的加密密钥 (SSE-C) 保护数据 - Amazon Simple Storage Service

您管理用于加密哪个对象的加密密钥的映射。Amazon S3 不存储加密密钥。您有责任跟踪您为哪个对象提供了哪个加密密钥。

我认为问题在于对象是用 AWS 不存储的密钥加密的。因此,当 AWS Transcribe 尝试读取对象时,它无法解密内容。

似乎没有办法将密钥传递给start_transcription_job().

您将需要使用 AWS 能够解密对象的备用加密方法。

于 2020-08-14T22:42:18.057 回答