def read_creds_from_environment_variables():
    """
    Read credentials from environment variables

    :return:
    """
    creds = init_creds()
    # Check environment variables
    if 'AWS_ACCESS_KEY_ID' in os.environ and 'AWS_SECRET_ACCESS_KEY' in os.environ:
        creds['AccessKeyId'] = os.environ['AWS_ACCESS_KEY_ID']
        creds['SecretAccessKey'] = os.environ['AWS_SECRET_ACCESS_KEY']
        if 'AWS_SESSION_TOKEN' in os.environ:
            creds['SessionToken'] = os.environ['AWS_SESSION_TOKEN']
    return creds
def read_creds_from_environment_variables ( ) : creds = init_creds ( ) if 'AWS_ACCESS_KEY_ID' in os . environ and 'AWS_SECRET_ACCESS_KEY' in os . environ : creds [ 'AccessKeyId' ] = os . environ [ 'AWS_ACCESS_KEY_ID' ] creds [ 'SecretAccessKey' ] = os . environ [ 'AWS_SECRET_ACCESS_KEY' ] if 'AWS_SESSION_TOKEN' in os . environ : creds [ 'SessionToken' ] = os . environ [ 'AWS_SESSION_TOKEN' ] return creds
Read credentials from environment variables

    :return: