Check your EC2 security outbound rules. You might need to add HTTP (80) and HTTPS (443) with the subnet 0.0.0.0/0 or a more secure one for your enterprise package dists.
0.0.0.0/0