Hi everyone,
I am trying to train a huggingface model on jupyternotebook on my local machine.
can i get some advice on: how do i pass my IAM role access key ?
i have installed sagemaker on my jupyternotebook, however, how do i connect to my AWS account? i found a line of code:

Blockquote


gets role for executing training job
iam_client = boto3.client(‘iam’)
role = iam_client.get_role(RoleName=’{IAM_ROLE_WITH_SAGEMAKER_PERMISSIONS}’)[‘Role’][‘Arn’]
hyperparameters = {
‘model_name_or_path’:‘finiteautomata/beto-sentiment-analysis’,
‘output_dir’:’/opt/ml/model’
# add your remaining hyperparameters
# more info here transformers/examples/pytorch/text-classification at v4.6.1 · huggingface/transformers · GitHub 3
}

Blockquote

i have set up a new user in my AWS account and have my access keys. just don’t understand how do it pass it on to my local machine?
everytime i only get errors like:

Blockquote
ValueError: Must setup local AWS configuration with a region supported by SageMaker.

NoCredentialsError: Unable to locate credentials

Blockquote

please advise!
thank you in advance.
meng