The PHENIX experiment at the BNL Relativistic Heavy Ion Collider (RHIC) has measured electrons with 0.3<pT<9GeV/c at midrapidity (|y|<0.35) from heavy-flavor (charm and bottom) decays in Au+Au collisions at sNN=200GeV. The nuclear modification factor RAA relative to p+p collisions shows a strong suppression in central Au+Au collisions, indicating substantial energy loss of heavy quarks in the medium produced at RHIC energies. A large azimuthal anisotropy v2 with respect to the reaction plane is observed for 0.5<pT<5GeV/c indicating substantial heavy-flavor elliptic flow. Both RAA and v2 show a pT dependence different from those of neutral pions. A comparison to transport models which simultaneously describe RAA(pT) and v2(pT) suggests that the viscosity to entropy density ratio is close to the conjectured quantum lower bound, i.e., near a perfect fluid.