1) A demon architect by name Maya, who was killed by Indra. This story comes in Kishkinda Kanda.
मयो नाम महातेजा मायावी दानवर्षभः || ४-५१-१० तेन इदम् निर्मितम् सर्वम् मायया कांचनम् वनम् |
"A marvellous fantasist by name Maya was there, a bullish demon of wizardry and by him with his phenomenal expertise all this golden woodland is constructed..."
तम् अप्सरसि हेमायाम् सक्तम् दानव पुंगवम् || ४-५१-१४ विक्रम्य एव अशनिम् गृह्य जघान ईशः पुरंदरः |
"Indra, the Administrator of Worlds and destroyer of enemy citadels, on taking His Thunderbolt eliminated Maya, when that eminent demon was engaged with an apsara, a paradisiacal nymph, called Hema.."
2) In the Mahabharata, when his life is spared by Krishna and Arjuna during the destruction of the Khandava forest, Maya offers his services to them. Krishna instructs Maya to construct a fabulous palace hall for Arjuna's elder brother, king Yudhisthira, at Indraprastha, which becomes the Mayasabha, renowned, beautiful and the largest of its kind.
Were both MAYAs one and the same (or)different?