Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in AWS by (5.6k points)

 I tried with boto3 But it is directing me to the AWS portal, not to the vocareum, it is giving me the below error: 

ClientError: An error occurred (InvalidAccessKeyId) when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

How can I connect to Vocareum with python?

1 Answer

0 votes
by (12.4k points)
edited by

As the credentials that are issued by Vocareum are temporary credentials, so you need to pass 'aws_session_token' to boto3:

import boto3

import time

import urllib

import json

AWS_ACCESS_KEY_ID = 'your_aws_access_key_id'

AWS_SECRET_ACCESS_KEY = 'your_aws_secret_access_key'

AWS_SESSION_TOKEN = 'your_aws_session_token'

job_name = 'job name'

job_uri = 's3.amazonaws.com/bucket_name/file_name.mp3'

transcribe = boto3.client('transcribe',

                          aws_access_key_id=AWS_ACCESS_KEY_ID,

                          aws_secret_access_key=AWS_SECRET_ACCESS_KEY,

                          aws_session_token=AWS_SESSION_TOKEN,

                          region_name='us-east-1')

Do you want to learn more about AWS? Checkout AWS Training by Intellipaat!

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

+1 vote
1 answer
0 votes
1 answer
0 votes
1 answer

Browse Categories

...