4

I uploaded a .flac file to an Amazon S3 bucket but when I try to transcribe the audio using the Amazon Transcribe Golang SDK I get the error below. I tried making the .flac file in the S3 bucket public but still get the same error, so I don't think its a permission issue. Is there anything that prevents the Transcribe service from accessing the file from the S3 bucket that I'm missing? The api user that is uploading and transcribing have full access for the S3 and Transcribe services.

example Go code:

    jobInput := transcribe.StartTranscriptionJobInput{
        JobExecutionSettings: &transcribe.JobExecutionSettings{
            AllowDeferredExecution: aws.Bool(true),
            DataAccessRoleArn:      aws.String("my-arn"),
        },
        LanguageCode: aws.String("en-US"),
        Media: &transcribe.Media{
            MediaFileUri: aws.String("https://s3.us-east-1.amazonaws.com/{MyBucket}/{MyObjectKey}"),
        },
        Settings: &transcribe.Settings{
            MaxAlternatives:   aws.Int64(2),
            MaxSpeakerLabels:  aws.Int64(2),
            ShowAlternatives:  aws.Bool(true),
            ShowSpeakerLabels: aws.Bool(true),
        },
        TranscriptionJobName: aws.String("jobName"),
    }

Amazon Transcribe response:

BadRequestException: The S3 URI that you provided can't be accessed. Make sure that you have read permission and try your request again.
Nikola
  • 14,888
  • 21
  • 101
  • 165

1 Answers1

0

My issue was the audio file being uploaded to s3 was specifying an ACL. I removed that from the s3 upload code and I no longer get the error. Also per the docs, if you have "transcribe" in your s3 bucket name, the transcribe service will have permission to access it. I also made that change but you still need to ensure you aren't using an ACL