Well, there's that "amazon overload" thing again....
Short answer- YOU DON'T!
When they get all excited like that, you have to wait until they finish their displays and calm down before trying to pick them up or THEY WILL bite.
They don't mean to, but it's part of the routine... they want to play.
And how does an amazon play with his or her toys? It attacks them!
Don't be the toy. If you wait another 30 seconds to a minute or so, you probably could pick him up just fine.
Just not while the tail is flairing and the eyes are going. Wait until that stops and the bird is standing upright again. Then hold your two fingers up when approaching the bird. Amazons are big on non-verbal communication, and it's a two way street. Walking up to the bird with two fingers means bird, you are on notice that I intend to pick you up.
Then it's how does the bird react. If the bird reacts to this by reaching for it like a lunge with his beak open, is still pinning, tail flairing, or hunches over as you approach, it usually means "I don't want to be picked up right now. I just want attention."
Ignore this warning at your own peril. My bird is trained to push fingers away with her beak when she doesn't want to be picked up. Most are not that subtle. They pinch, or nip, or outright bite...
If the foot comes up, or the bird comes over you and remains calm and upright (not hunched over) that's "I am ready to be picked up."
Sometimes, it's wait til I finish my happy to see you display, don't interrupt me I wasn't finished...
Always let them finish first. Don't pick one up in the middle of a display. They are too wound up at that point.