Nicholas James Langan, 25, was arrested on popular Batu Bolong beach in January after he was found smoking the drug with an Indonesian who worked as a driver at a hotel. Marijuana weighing 0.86 grams (0.03 oz) was also seized.
Indonesia has recently stepped up a campaign against drug use and the tough sentence came almost three months after eight drug convicts, including seven foreigners, were executed by firing squad despite international appeals for mercy.
“The defendant is proven convincingly and legally guilty of misusing drugs for personal use,” presiding judge Cening Budiana told a court in the Balinese capital Denpasar as he sentenced Langan.
His sentence was lighter than the four years recommended by prosecutors, with the judge saying that he had been polite and truthful in court and was still young.
Langan, through an interpreter, told reporters he “needed time to consider” whether to appeal the verdict.
The Indonesian driver was also sentenced to one year in jail on Thursday at the same court hearing as Langan.
Indonesia has some of the toughest anti-drugs laws in the world. Jakarta resumed executions in 2013 after a hiatus of several years and President Joko Widodo, who took office in October, has been a vocal supporter of the death penalty for drug traffickers.