With the first direct detection of merging black holes in 2015, the era of gravitational wave (GW) astrophysics began. A complete picture of compact object mergers, however, requires the detection of an electromagnetic (EM) counterpart. We report ultraviolet (UV) and X-ray observations by Swift and the Nuclear Spectroscopic Telescope ARray (NuSTAR) of the EM counterpart of the binary neutron star merger GW170817. The bright, rapidly fading ultraviolet emission indicates a high mass ($approx0.03$ solar masses) wind-driven outflow with moderate electron fraction ($Y_{e}approx0.27$). Combined with the X-ray limits, we favor an observer viewing angle of $approx 30^{circ}$ away from the orbital rotation axis, which avoids both obscuration from the heaviest elements in the orbital plane and a direct view of any ultra-relativistic, highly collimated ejecta (a gamma-ray burst afterglow).