def METHOD_NAME(self, name, data):
    conf_path = os.path.join(
        RUNTIME_VARS.TMP_CONF_DIR, "cloud.profiles.d", "ec2.conf"
    )
    with salt.utils.files.fopen(conf_path, "r") as fp:
        conf = yaml.safe_load(fp)
    conf[name].update(data)
    with salt.utils.files.fopen(conf_path, "w") as fp:
        salt.utils.yaml.safe_dump(conf, fp)