The choice to breastfeeding is a very personal one, but there is some evidence that doing so for longer than 6 months may reduce your risk of breast cancer regardless of your age or menopausal status.
This is supported in part by research in which women in developing countries like Pakistan⁠—⁠who almost invariably breastfeed longer⁠—had comparatively lower rates of breast cancer.
Some studies have also suggested that breastfeeding protects against hormone receptor-negative breast cancers, including an aggressive type known as triple-negative breast cancer

Based on these findings, the researchers postulated that increasing the rate and duration of breastfeeding in all countries, regardless of income, could prevent as many as 20,000 deaths from breast cancer each year.

Therefore it is recommended to breast feed your baby for minimum 6 months to about 2 years.