import json
import logging


def retrieve_instance_type_mapping(file_path):
    """Retrieve instance type mapping file content."""
    try:
        with open(file_path) as mapping_file:
            return json.load(mapping_file)
    except Exception as e:
        logging.error(
            "Unable to get instance_type mapping from '%s'. Failed with exception: %s",
            file_path,
            e,
        )
        raise