Place eggs in a saucepan and cover with cold water. Bring the water to a boil and immediately turn off the heat. Leave the eggs in the covered pot for 8 minutes, until hard-boiled. Drain and run the eggs under cold water. Peel and chop the hard-boiled eggs into half-inch pieces.
Heat the oil in a skillet over medium heat and add the onions. Cook the onions until caramelized, about 8-10 minutes. Set aside to cool.
Mash the avocados until smooth and mix in the onions, eggs and lemon juice.
Season generously with salt and pepper. Serve with rye bread or tortilla chips.