A flux comprising: a rosin; a solvent; a thixotropic agent; and an activator, wherein the thixotropic agent contains a compound represented by General Formula and a polyamide, the polyamide is a condensate of an aliphatic carboxylic acid and a hydroxy group-containing aliphatic carboxylic acid, and an amine, a temperature of an endothermic peak of the polyamide by differential scanning calorimetry is 120°C or higher and 200°C or lower, the aliphatic carboxylic acid includes a dicarboxylic acid, an amount of the rosin is 30% by mass or more and 50% by mass or less with respect to a total mass of the flux, an amount of the compound represented by General Formula is 1% by mass or more and 10% by mass or less with respect to a total mass of the flux, and an amount of the polyamide is 1% by mass or more and 15% by mass or less with respect to a total mass of the flux, and the temperature of an endothermic peak of the polyamide is measured by setting a temperature raising rate to 20°C/min, raising a temperature of about 10 mg of the polyamide from 25°C to 350°C in a nitrogen atmosphere, and defining a temperature of a peak top as the temperature of the endothermic peak, [in the formula,R 11 and R 11' each independently represent a hydrocarbon group having 11 to 30 carbon atoms which may have a substituent, R 0a and R 0a' each independently represent a hydrocarbon group having 12 to 31 carbon atoms which may have a substituent or a hydrogen atom, R 0b2 represents a hydrocarbon group having 4 to 12 carbon atoms which may have a substituent, R 21 and R 21' each independently represent an alkylene group having 2 to 6 carbon atoms, and R 0c and R 0c' each independently represent an alkylene group having 2 to 6 carbon atoms or a single bond]. a rosin; a solvent; a thixotropic agent; and an activator, wherein the thixotropic agent contains a compound represented by General Formula and a polyamide, the polyamide is a condensate of an aliphatic carboxylic acid and a hydroxy group-containing aliphatic carboxylic acid, and an amine, a temperature of an endothermic peak of the polyamide by differential scanning calorimetry is 120°C or higher and 200°C or lower, the aliphatic carboxylic acid includes a dicarboxylic acid, an amount of the rosin is 30% by mass or more and 50% by mass or less with respect to a total mass of the flux, an amount of the compound represented by General Formula is 1% by mass or more and 10% by mass or less with respect to a total mass of the flux, and an amount of the polyamide is 1% by mass or more and 15% by mass or less with respect to a total mass of the flux, and the temperature of an endothermic peak of the polyamide is measured by setting a temperature raising rate to 20°C/min, raising a temperature of about 10 mg of the polyamide from 25°C to 350°C in a nitrogen atmosphere, and defining a temperature of a peak top as the temperature of the endothermic peak, [in the formula,R 11 and R 11' each independently represent a hydrocarbon group having 11 to 30 carbon atoms which may have a substituent, R 0a and R 0a' each independently represent a hydrocarbon group having 12 to 31 carbon atoms which may have a substituent or a hydrogen atom, R 0b2 represents a hydrocarbon group having 4 to 12 carbon atoms which may have a substituent, R 21 and R 21' each independently represent an alkylene group having 2 to 6 carbon atoms, and R 0c and R 0c' each independently represent an alkylene group having 2 to 6 carbon atoms or a single bond].