Martin Robert Moller, 42, also must pay a fine of around $100,000 or face an additional three months in prison, a report by the newspaper Bali Daily said.
Moller, who was born in Rauxel, Germany, was picked up when his Thai Airways flight from Bangkok arrived in Indonesia's tourist resort of Bali Dec. 14.
Officers became suspicious of Moller's impatient behavior at the airport and took him for questioning and an examination at a hospital.
They discovered 22 pills of hashish weighing a total of 287 grams in Moller's stomach. The hashish was valued at nearly $3.2 million.
Moller received the minimum sentence versus the maximum 15 years, the Bali Daily said. The maximum fine is more than $18 million or an additional six months in jail.
Judges were lenient because of Moller's good behavior during the trial and the fact that he has no previous convictions, the Bali Daily reports said.
"I truly regret my conduct and I accept the decision," Moller told the court through his translator.
Moller admitted to being a drug addict for 20 years. He said he bought the drugs in Bangkok for personal use because they helped stimulate his imagination during his work as a photographer and graphic designer.
His sentencing comes after a 56-year-old British grandmother launched an appeal at Indonesia's High Court against her death sentence in Bali in January.
Lindsay Sandiford is accused of smuggling more than $3 million worth of cocaine into the country. She was arrested after a flight from Thailand in May 2012 and accused of being the leader of a drug ring involving three other Britons.
Sandiford, from Cheltenham, lost her first appeal against the ruling at the Bali High Court last month.
When she was convicted, the prosecution recommended 15 years imprisonment but in January a panel of judges sentenced Sandiford to death by firing squad.
She maintains her innocence, saying she was forced to smuggle the drugs -- nearly 11 pounds of cocaine -- because one her co-defendants threatened to kill her son.
One of the other Britons, Julian Ponder, 43, from Brighton, was imprisoned for six years in January after being cleared of smuggling but convicted of possessing of cocaine.
The two other Britons also were found innocent of trafficking, with one sentenced to four years in prison for drug possession and the other to one year in prison for failure to report a crime.
Last month police found the body of the judge who sentenced Sandiford. He died of an apparent heart attack at his home in Bali.
District Court Judge Amser Simanjuntak, 55, was known as "deadly judge" for frequently issuing severe sentences in complex or high-profile trials, The Jakarta Post newspaper reported at the time.
Jessica Simpson shares three-way kiss with friends in photo
Teacher apologizes for showing sexual image of herself in class