"And the days of Israel drew near to die" (Genesis 47:29). This is what Scripture said: "For we are strangers before You, and sojourners, as all our fathers; our days upon earth are as a shadow, and there is no hope" (1 Chronicles 29:15). And not like the shadow of a wall, and not like the shadow of a tree, but like the shadow of a bird, as it is said: "His days are as a passing shadow" (Psalms 144:4). "And there is no hope" — there is no one who can hope that he will not die. All know that they are destined to die. Abraham said: "And I go childless" (Genesis 15:2). Isaac said: "Before I die" (Genesis 27:4). Jacob said: "And I will lie with my fathers" (Genesis 47:30). When? At the time he drew near to die, "And the days of Israel drew near to die."
Jacob's Days Draw Near and the Shadow of a Passing Bird
Midrash Tanchuma Buber, Vayechi 2:1
ויקרבו ימי ישראל למות וגו' (בראשית מז כט), זש"ה כי גרים אנחנו לפניך ותושבים ככל אבותינו (כי צל) [כצל] ימינו עלי ארץ ואין מקוה (דה"א כט טו), ולא כצלו של כותל. ולא כצלו של אילן, אלא כצלו של עוף, שנאמר (ימינו) [ימיו] כצל עובר (תהלים קמד ד). ואין מקוה, אין מי שיקוה שלא ימות, הכל יודעין שעתידין למות, אברהם אמר ואנכי הולך ערירי (בראשית טו ב), יצחק אמר בטרם אמות (שם כז ד), יעקב אמר ושכבתי עם אבותי (שם מז ל), אימתי בשעה שנטה למות, ויקרבו ימי ישראל למות.