This is an interesting question to consider, because both characters in various ways seem to do what they can to prove themselves not to be heroes for significant sections of their respective texts. Hamlet, for example, seems to be characterised by procrastination as he does anything he can to avoid actually confronting his uncle concerning the death of his father, and spends more time in deep philosophical introspection than he does actualy doing anything constructive. Likewise, Amir's character is shaped by his failure to act during Assef's assault of Hassan. It is this failure that seems to form his early life and adolescence, and his father's heroic deeds seem only to drive home how much of a hero Amir is not.
However, we can begin to see a shift in this story towards the end of both texts. Amir, for example, does go back to face his demons thanks to Rahim Khan and as a result is given another chance to be a hero in a situation that is eerily similar to the first where he failed to show his heroic qualities. He therefore confronts Assef over Hassan's son, and is badly beaten as a result, which seems to symbolise his redemption. He is heroic in the way that he goes back to Afghanistan and faces danger and possible death in order to try and save Hassan's son. In the same way, Hamlet eventually does face up to his responsibilities, returning to avenge his father. If we look at Hamlet in Act V, for example, he seems to have reached a point where he is ready to die and accept the consequences of his actions, and so he has gained a measure of inner peace. This takes a certain amount of heroism, although personally I think Amir is more of a hero.