There seem to have been varying opinions on this point. From footnote 41 in this article:
"The early Greek philosopher Thales of Miletos is credited by Diogenes Laertius as the first to recognize amber’s magnetism: “Arguing from the magnet and from amber, he attributed a soul or life even to inanimate objects” (Diogenes Laertius 1.24, vol. 1, ed. and trans. R. D. Hicks, Loeb Classical Library 184 [London, 1993]). E. R. Caley and J. C. Richards, Theophrastus on Stones (Columbus, 1956), p. 117, argue that this claim rests on shaky ground; that Thales was the first to mention the property can be inferred only indirectly from Diogenes Laertius’s statement: “Aristotle and Hippias say that, judging by the behaviour of the lodestone and amber, he also attributed souls to lifeless things.” Caley and Richards consider the possibility “that it was Hippias who said that Thales understood the attractive property of amber, but there is no way of confirming such an inference because the works of Hippias are not extant.” Plato (Timaeus 80c) alludes to amber’s magnetism but denies that it is a real power of attraction. Aristotle does not mention amber in the relevant section of On the Soul (De Anima 1.2.405A). Thus, following Caley and Richards, Theophrastus is the earliest extant account. If Thales did describe amber’s static electricity, he may have done so based on his observation of wool production, which used amber implements: distaff, spindle, and whorls. I owe this observation to Schwarzenberg 2002, who calls attention not only to the famous wool of Miletos, but also to the number of extant seventh-century spinning tools. Pliny notes that Syrian women used amber whorls in weaving and that amber picks up the “fringes of garments,” and also comments on amber’s electrostatic property. But, unlike Plato, he thinks its magnetic property is like that of iron. Plutarch (Platonic Questions 7.7) explains that “the hot exhalation released by rubbing amber acts in the same ways as the emanations from the magnet. That is, it displaces air, forming a vacuum in front of the attracted object and driving air to the rear of it”: De Lapidibus, ed. and trans. D. E. Eichholz (Oxford, 1965), p. 200, n.b."