In previous posts, I saw a few references calling for lag bolts. The IRC no longer allows lag bolts for installing railing posts. Through-bolts with steel brackets are required, and they must be 1/2" diameter. Although the IRC allows lags for ledger attachments, I prefer the stronger through-bolts there as well, along with appropriate spacers to enable the ledger to dry.
A former neighbor down the street had a second story deck built by his deck "expert." The guy used 4 x 4 unbraced posts, and the thing shook so much when walked on that his wife was afraid to go out onto it. It even swayed in a moderate wind. I braced it for him using 2 x 4s (longest were 12', and connected with through-bolted spacers where they crossed). If I had to do it over, I would use 2 x 6 bracing, as the 2 x 4s still allowed a small amount of wobble when in use. And I'd never use 18' 2 x 4 cross braces not connected at the center--that's an invitation for failure. Long rubber bands would work just as well.
The original deck builder wouldn't do anything about the wobble issue, saying he built it according to the plans they submitted for approval to the County Building Department. The neighbor was happy with my work, and even gave me a 6-pack of my favorite European beer for payment. Life is good!