Hello ,
For Windows Update you will need to open the URLs mentioned in the answer for similar question in our community:
Additionally, you will need to open ports, Windows Update requires TCP port 80, 443, and 49152-65535.
In regards, to the Remote Desktop ClearingHouse the IPs for the endpoints are not disclosed by Microsoft as they are multiple, vary depending on geographical location, and may change without pre advice.
As additional help, have you tried to read Amazon Web Services? I would think that they could have some sort of Firewall Template for this sort of purposes, as you may not be the first customer to need it, and would be easier to implement.
Hope this helps with your query,
--If the reply is helpful, please Upvote and Accept as answer--
Luis D