Hi everybody,
I wanna ask you about AWS Transcribe Analytics Call.
API is well with AWS Transcribe but I need also sentiment Analysis, so I try to use AWS Transcribe Analytics. There is my code :
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-east-1')
job_name = "my-first-call-analytics-job"
job_uri = "PATH_S3_TO_WAV_WHO_HAD_WORD_FOR_AWS_TRANSCRIBE"
output_location = "PATH_TO_CREATED_FOLDER"
data_access_role = "arn:aws:s3:::MY_BUCKET_NAME_WHERE_WAV_FILES"
transcribe.start_call_analytics_job(
CallAnalyticsJobName = job_name,
Media = {
'MediaFileUri': job_uri
},
DataAccessRoleArn = data_access_role,
OutputLocation = output_location,
ChannelDefinitions = [
{
'ChannelId': 0,
'ParticipantRole': 'AGENT'
},
{
'ChannelId': 1,
'ParticipantRole': 'CUSTOMER'
}
]
)
while True:
status = transcribe.get_call_analytics_job(CallAnalyticsJobName = job_name)
if status['CallAnalyticsJob']['CallAnalyticsJobStatus'] in ['COMPLETED', 'FAILED']:
break
print("Not ready yet...")
time.sleep(5)
print(status)
I had done aws configure and I use a IAM user who have AdministratorAccess.
botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the StartCallAnalyticsJob operation: User: MY_ARN_USER is not authorized to access this resource
Any help please ?
Thank you very much!
Hello I repeat the following steps and I get the same error.
I creat a new IAM account Checked Access key - Access by programming Add permission AmazonTranscribeFullAccess
I enter "aws configure" on terminal then the Access Key ID, Secret Access Key, region us-east-1 and output format json. I run the code and still get the error botocore.exceptions.ClientError: An error occurred (AccessDeniedException) when calling the StartCallAnalyticsJob operation: User: [ARN USER THAT I JUST CREATED] is not authorized to access this resource
Any help please ? I don't understand why AWS Transcribe work but AWS Transcribe Analytics not working ....
If the error message says
...User: [ARN USER THAT I JUST CREATED] is not authorized to access this resource
then it means the python script is picking up the correct user. I also double-checked that the policyAmazonTranscribeFullAccess
contains theStartCallAnalyticsJob
permission. You can maybe try explicitly add thetranscribe:StartCallAnalyticsJob
permission to your IAM user.Are you using a personal account or a company account? Is the account in a AWS Organization? Maybe there are company-wide IAM permissions boundary that blocks you from using it?