If the product you recommend no longer exists then readers who click through from your link will either be presented with an error page or it will be shown that the product can no longer be delivered. This means you will need to audit your links every so often and update your posts by replacing any obsolete products with new suggestions. There are paid tools and solutions available to help you easily audit Amazon affiliate links on your site if you wish to do so.
Here is an example of a product page on Amazon for a product that is no longer available – https://www.amazon.com/dp/B01CC3FKKC
As you can see – the listing is still shown, but the product can no longer be purchased. The great thing about Amazon is that it still shows suggested similar products below and if you used the ‘normal’ 24-hour affiliate link, you will still get credit if your reader purchases something else from Amazon within 24 hours!