I think it's important to keep in mind that the 12 vote margin is comfortable for Amash and supporters of new NSA restrictions and uncomfortable for its defenders.
Here's why: opponents of Amash wielded an argument that "split the vote". Representatives who voted against Amash could have done so for one of two reasons:
(1) They actively support providing the NSA with unchecked access to cell phone metadata under the "business records" provision of PATRIOT, or
(2) They don't support that access, but can't support a broad amendment that potentially de-funds whole NSA programs, and instead need something finer grained to correct NSA with.
Meanwhile, everyone who supported Amash believes strongly --- so strongly that they're willing to do something disruptive to NSA --- that new checks on NSA are needed.
(I think Amash was a good amendment, if only because it would force the House to do its actual job and carefully regulate intelligence collection; if it caused a temporary shitstorm, so much the better --- it'd be a well-deserved comeuppance for a legislature that has been derelict in its duty to oversee these programs. But you should be aware that opponents of Amash had a persuasive-sounding argument for voting it down even if you believed new regulations were needed.)
I think this was a pretty hopeful vote.