Now, this a a weird one. I have created a config in ~/.aws/config
[profile dev_config]
output = json
region = us-east-1
I also have credentials in my ~/.aws/credentials file. FYI, info is blank on purpose.
[dev_config]
aws_access_key_id = ...
aws_secret_access_key = ...
aws_session_token = ...
When I run my python script, I execute
session = boto3.Session(profile_name="dev_config")
s3client = session.client('s3')
For some reason, I get the error
'The config profile (dev_config) could not be found'
I am absolutely stumped on this one because everything seems correct with my config and credentials file. All of the forums suggest that my config or credentials file is set up wrong but I have everything in place. It's like boto3 cannot file my files for some reason. I am running this through pycharm in centos7 btw. If anyone has anything else I should check for, please help.
Also, I know this is a similar question as to other posts, but none of those are helpful to me right now. They all point to a bad config like I said.