Search This Blog

Friday, May 28, 2021

Eclipse - boto3 botocore.exceptions.ProfileNotFound: The config profile () could not be found

1.  If terminal is not opening, 

Go and update the eclipse from Help->MarketPlace.

2. See whether you installed boto3 and awscli from sudo or root and now you login as same user or different, 

   if different, then uninstall the above two plugin and install with the current user. 

    pip/pip3 install boto3

    pip/pip3 install awscli


3.type aws configure

            Enter Key, access scret, region

4. type vi ~/.aws/credentials

        [default]

            aws_access_key_id = xxx

            aws_secret_access_key = xx+xx

        [vijay]

            aws_access_key_id = x

            aws_secret_access_key = x+xx


5. your python program
   
          import csv
import datetime
import os
import smtplib, ssl
import boto3

botSession=boto3.session.Session(profile_name="vijay")
iam_mag_con=botSession.client(service_name="ec2",region_name='us-east-2')
resp = iam_mag_con.describe_regions()

....... 

No comments:

Hit Counter


View My Stats