The officer, identified only as D49, said in a statement that she "instantly" thought she would die when Michael Adebolajo, 28, ran towards the BMW X5 she had driven to Woolwich in the aftermath of the soldier's death.
Prosecutor Richard Whittam QC read her account to jurors at the Old Bailey, in which she said: "I saw a black male running at me waving both his hands in the air in a chopping motion. In his right hand I saw what I call a meat cleaver or a machete.
"I instantly thought, 'he's going to kill me'. I went to draw my Glock. Due to my position in the car, the internal door has a panel jutting out - I could not immediately draw my Glock out due to this. It was a split second decision to draw my Taser."
She saw a second suspect, said to be Michael Adebowale, 22, holding a gun.
"I thought, 'oh my God, he's going to shoot me'. I feared for my life."
Mr Adebolajo and Mr Adebowale are accused of murdering Fusilier Rigby near Woolwich Barracks in south-east London on May 22, as well as attempting to murder a police officer and conspiracy to murder a police officer on or before that day.
A second armed officer, identified as E48, was in court to give evidence.
The marksman opened fire on Mr Adebolajo as he ran towards the car, telling the jury he was in "the frame of mind" that the suspect posed a threat.
The trial continues.