The config profile (default) could not be found
I am getting this error every time I try to mock the aws_credentials from the tutorial, I keep getting the "botocore.exceptions.ProfileNotFound: The config profile (adfs) could not be found" error. I reinstalled moto a few times and I am not sure why I keep getting this error and its hindering my progression.

Here is the example code I tried to follow from the setup document. I tried even doing a os.enviro['AWS_PROFILE'] = 'adfs' with no luck
Hi @iffystiffy, that looks like an error coming from boto3 itself. If you remove the with mock_s3 part, it will still throw an error if the profile does not exist.
Note that the profile does not need to be mocked for Moto to work. Setting the fake credentials as environment variables is enough to ensure the test will never connect to to AWS.. (Also, as far as I know, our documentation never mentions mocking a profile - but please correct me if I'm wrong.)
Right now I reinstalled boto3 botocore from 1.27.68 to 1.27.71 and I am still getting the "botocore.exceptions.ProfileNotFound: The config profile (adfs) could not be found" error. I am not sure where the 'adfs' profile is created because all the packages are pretty much brand new.
If you haven't created the adfs profile, and you don't want to, you can just create the boto3-client without specifying a profile:
yield boto3.client("s3", region_name="us-east-1")
I tried yield boto3.client("s3", region_name="us-east-1") and its still giving me the same adfs error. I did a complete copy and paste of the tutorial code posted on the moto website and the same error
Did you also remove the os.environ["AWS_PROFILE"] = "asdf"? That part is definitely not on the official website (docs.getmoto.org)
yeah I got rid of os.environ["AWS_PROFILE"] = "asdf" as well with no luck.
I was following this tutorial https://www.learnaws.org/2020/12/01/test-aws-code/ word for word
Did you configure AWS previously? Whatever profile is missing, must be configured somewhere.
Did you try running the test without Moto? I'm fairly certain that the error will still occur then, as it sounds like a botocore configuration issue.