def create_auto_profile(role_session, user_session, session_name,
    source_profile_name, role_arn):
    """Create the profile that'll be stored in the credentials file for autoawsume.

    Parameters
    ----------
    - role_session - the session credentials from the assume-role api call
    - user_session - the session credentials from the get-session-token api call
    - session_name - the name to give to the role session
    - source_profile_name - the name of the source profile

    Returns
    -------
    The autoawsume profile
    """
    return {'aws_access_key_id': role_session['AccessKeyId'],
        'aws_secret_access_key': role_session['SecretAccessKey'],
        'aws_session_token': role_session['SessionToken'], 'aws_region':
        role_session['region'], 'awsume_role_expiration': role_session[
        'Expiration'], 'awsume_user_expiration': user_session['Expiration'],
        'awsume_session_name': session_name, 'awsume_cache_name': 
        'awsume-credentials-' + source_profile_name, 'aws_role_arn': role_arn}
