Моя работа по расшифровке не выполняется с ответом The data in your input media file isn't valid. Check the media file and try your request again
. Входной файл находится в частном сегменте S3 и отлично работает, когда я вручную отправляю его через интерфейс AWS transcribe или через сегмент publi c S3.
Может ли проблема быть в облачной информации лямбда-функции неправильное разрешение? Что я мог упустить?
getTranscriptionJobResponse:
{
"TranscriptionJob": {
"CompletionTime": "0001-01-01T00:00:00",
"ContentRedaction": null,
"CreationTime": "2020-07-14T07:02:33.785Z",
"FailureReason": "The data in your input media file isn't valid. Check the media file and try your request again.",
"JobExecutionSettings": null,
"LanguageCode": {
"Value": "en-US"
},
"Media": {
"MediaFileUri": "https://s3.us-east-1.amazonaws.com/vidaudtranscriptionb772eac002c6449096461a128cad70417-dev/private/us-east-1%3A5e9adf47-2390-4860-842e-27e75527ce3f/04476ec4-2f7a-42ea-8c02-4eb8ab233889.mp4"
},
"MediaFormat": {
"Value": "mp4"
},
"MediaSampleRateHertz": 0,
"Settings": {
"ChannelIdentification": false,
"MaxAlternatives": 0,
"MaxSpeakerLabels": 2,
"ShowAlternatives": false,
"ShowSpeakerLabels": true,
"VocabularyFilterMethod": null,
"VocabularyFilterName": null,
"VocabularyName": null
},
"StartTime": "2020-07-14T07:02:33.81Z",
"Transcript": {
"RedactedTranscriptFileUri": null,
"TranscriptFileUri": null
},
"TranscriptionJobName": "189b3064-2956-4627-ad17-08e5fbfb7cb6",
"TranscriptionJobStatus": {
"Value": "FAILED"
}
},
"ResponseMetadata": {
"RequestId": "d1597e90-1825-4cae-aaaa-e3fd5acce9fe",
"Metadata": {}
},
"ContentLength": 682,
"HttpStatusCode": 200
}
startTranscriptionJobRequest:
{
"ContentRedaction": null,
"JobExecutionSettings": null,
"LanguageCode": {
"Value": "en-US"
},
"Media": {
"MediaFileUri": "https://s3.us-east-1.amazonaws.com/vidaudtranscriptionb772eac002c6449096461a128cad70417-dev/private/us-east-1%3A5e9adf47-2390-4860-842e-27e75527ce3f/04476ec4-2f7a-42ea-8c02-4eb8ab233889.mp4"
},
"MediaFormat": {
"Value": "mp4"
},
"MediaSampleRateHertz": 0,
"OutputBucketName": null,
"OutputEncryptionKMSKeyId": null,
"Settings": {
"ChannelIdentification": false,
"MaxAlternatives": 0,
"MaxSpeakerLabels": 2,
"ShowAlternatives": false,
"ShowSpeakerLabels": true,
"VocabularyFilterMethod": null,
"VocabularyFilterName": null,
"VocabularyName": null
},
"TranscriptionJobName": "189b3064-2956-4627-ad17-08e5fbfb7cb6"
}
Lamda функция CloudFormation:
"Resources": {
"lambdaexecutionpolicy": {
"DependsOn": [
"LambdaExecutionRole"
],
"Type": "AWS::IAM::Policy",
"Properties": {
"PolicyName": "lambda-execution-policy",
"Roles": [
{
"Ref": "LambdaExecutionRole"
}
],
"PolicyDocument": {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"logs:CreateLogGroup",
"logs:CreateLogStream",
"logs:PutLogEvents"
],
"Resource": {
"Fn::Sub": [
"arn:aws:logs:${region}:${account}:log-group:/aws/lambda/${lambda}:log-stream:*",
{
"region": {
"Ref": "AWS::Region"
},
"account": {
"Ref": "AWS::AccountId"
},
"lambda": {
"Ref": "LambdaFunction"
}
}
]
}
},
{
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:ListBucket",
"s3:DeleteObject"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Effect": "Allow",
"Action": [
"transcribe:*"
],
"Resource": "*"
},
{
"Effect": "Allow",
"Action": [
"comprehend:*"
],
"Resource": "*"
}
]
}
}
}
}