Amazons are known for being one of the worst biters, right up there with parrotlets and lovebirds. As for pooping on your keyboard, he probably pooped because he'd just flown. The first few months I had Noah, he'd become agitated when he had to poop, and would often fly off (often to my mom) to poop. Also, if your Amazon found the confrontation with you stressful/upsetting/irritating, that may have also caused him to poop, as birds often poop when startled or upset. Had he been trying to get back at you, he probably would've looked you in the eye then chomped down on the laptop's screen. Or started yelling at you.
As for biting you when you were filling his bowl... At the time, he was focusing on eating, and may not have realized you were there trying to fill his dish. Another possibility is that the act of eating triggered his resource protecting instincts, and that's why he bit you, even if you were providing him with even more food to eat. For example, my shih-poo, Teddy, is the sweetest, most gentle guy. Anyways, the other day was his birthday, so he got a special treat, but I gave him too much. So, I let him know that I was going to take it from him to break into a smaller piece. He stiffened his posture and turned his head protectively. When I grabbed it (he knew it was me), he chomped down on my hand and broke the skin. Now, this guy is super submissive and has never behaved aggressively towards humans. However, the food was overly stimulating, causing him to reflexively bite down to protect his resource. He wasn't being agressive, trying to scare me off, or trying to hurt me. When an animal is focused on something (playing, grooming, eating, watching a squirrel outside), they'll likely react instinctively (i.e., bite) if interrupted.
Also, parrots can be very protective of their cage and the things in their cage. By filling his dish (and therefore invading his territory), he could've taken it as an act of disrespect and felt threatened, and responded by biting you. With Noah, he knows that I have the utmost respect for him and his belongings, so I can take yummy sunflower seeds out of his dish while he's eating, or step him up when he's in the middle of eating yummy treats from his dish, without him becoming upset, because he knows I'm not truly taking things from him. Based on a strong history of positive reinforcement, etc., he'll willingly step up for me even if he's doing something that's extremely enjoyable. This is because he knows we're going to train, eat snacks, preen, or have a bath. He trusts that I'm not going to force him to do anything he doesn't want to do or isn't comfortable with.
Next time he's eating, you could tell him you're going to fill his dish and ask him to step up using a perch (if he doesn't want to, don't make him) and show him you have a treat for him. When he steps up, reward him and fill his dish, putting a couple of treats in his dish as an extra reward to show him that if he cooperates, good stuff happens and that you aren't trying to be a party pooper.