Brazilian Marco Archer Cardoso Moreira, 53, and Dutch national Ang Kiem Soe, 52, were among six people who faced the firing squad on Sunday.
The other four convicts were from Indonesia, Malawi, Nigeria and Vietnam.
Indonesia has some of the toughest drug laws in the world. It ended a four-year moratorium on executions in 2013.
President Joko Widodo has said that he will show no mercy towards drug criminals because they have ruined the lives of so many.
The six convicts were executed in Central Java province - five on the island of Nusa Kambangan and the other one, a Vietnamese woman, in the small central Javanese town of Boyolali.
Brazil says Moreira was the first Brazilian national to be executed abroad.
He was arrested in 2003 after police at Jakarta airport found  13.4 kg of cocaine hidden in his hang glider.
Brazilian President Dilma Rousseff said in a statement that she was "outraged and dismayed".
"Relations between the two countries have been affected," said Ms Rousseff.
Ms Rousseff had made a plea for clemency on Friday, but it was rejected by Mr Widodo.
She told her Indonesian counterpart that she respected the sovereignty and judicial system of his country but as a mother and head of state she was making the appeal for humanitarian reasons.
Brazil says Mr Widodo said he understood the Brazilian president's concern but said he could not commute the sentence as the full legal process had been followed.
Dutch Foreign Minister Bert Koenders said King Willem-Alexander and Prime Minister Mark Rutte had also personally contacted the Indonesian president in the case of Ang Kiem Soe.
Mr Koenders called the execution "a cruel and inhumane punishment ... an unacceptable denial of human dignity and integrity".
Human rights group Amnesty International urged the Indonesian government to halt executions immediately, and eventually abolish the death penalty.
Moreira said in a video recorded by a friend that he regretted trying to smuggle cocaine into Indonesia.
"I am aware that I committed a serious offence, but I believe I deserve another chance. Everyone makes mistakes."
A second Brazilian national, Rodrigo Muxfeldt Gularte, remains on death row in Indonesia, also convicted with drug trafficking offences.
Brazil abolished the death penalty in times of peace when it became a republic in 1889.
Brazil and the Netherlands have recalled their ambassadors from Indonesia after the execution of two of their nationals for drug trafficking.