I’m a newbie at aws. I wanted to use the comprehend api with python.
I wrote the following python script:
import boto3
import json
comprehend = boto3.client(service_name='comprehend')
text = "It is raining today in Seattle"
print('Calling DetectSentiment')
sentiment_output=comprehend.detect_sentiment(Text=text, LanguageCode='en')
print('End of DetectSentiment\n')
I created an IAM user with administrator access and configured it in my linux console:
(base) florian@florian3090:~/Desktop/aws$ aws configure
AWS Access Key ID [****************BIP6]:
AWS Secret Access Key [****************a/1f]:
Default region name [us-west-1]:
Default output format [json]:
But there is an error every time I call my python file:
botocore.exceptions.ClientError: An error occurred (NotAuthorizedException) when calling the DetectSentiment operation: Your account is not authorized to make this call.
Unfortunatley I could not solve this error until now.
This is my first AWS project. Do I need to unlock anything?
I would really appreciate any tip how to solve this issue.
Thanks in advance!