in aws_msk_iam_sasl_signer/MSKAuthTokenProvider.py [0:0]
def __load_credentials_from_aws_profile__(aws_profile):
"""
Loads IAM credentials from named aws profile.
Parameters:
- aws_profile (str): The name of the AWS profile to use for the session.
Returns:
:class:`botocore.credentials.Credentials` object
"""
# Create a botocore session with an aws named profile
botocore_session = botocore.session.Session(profile=aws_profile)
return botocore_session.get_credentials()