Is a lung biopsy done while you are awake?

Depends. That depends on the type of biopsy. A percutaneous biopsy done by an interventional radiologist under fluoroscopy or ct guidance is usually done with local anesthesia. The patient has to be awake to cooperate with breath-holding when needed. Sometimes a mild sedative is given.
Depends. If it's a CT guided biopsy, you are awake, but usually given something like a valium. If it is a bronchoscopic biopsy, then you are usually sedated, but not put under general anesthesia. An open lung biopsy is done via general anesthesia.
Yes. In addition to the other answer provided, some surgeons in very select cases, will perform surgical biopsy with mild sedation and local anesthetic. It is not the ideal way, but can be done if necessary.