The "sign-on bonus" comes with serious strings attached. A good friend of mine got royally screwed when he mistook that bonus for real money, then got pushed to the point of burnout and had to leave; Amazon demanded a lot of the money back, but he didn't have it anymore.
Sign-on bonus is prorated and payed monthly, you definitely don’t need to pay back anything (source: I worked at Amazon).
Maybe your friend talked about relocation bonus, which you need to pay back if you don’t work long enough.
Amazon does not demand your pro rated cash sign on bonus back that you get every pay period for the first two years.
Source: I worked at AWS from 2020-2023.
I worked at Amazon in 2021 and rage-quit after 9 months. The sign-on bonus I received was paid out monthly, so I didn't have to pay anything back. If it's large enough, they pay it monthly because they know it's very likely you won't make it to the 2nd year.