Is there a way to force aws cli to use proxy only during the execution of a command at a particular step in my user data. The instance has both HTTP_PROXY and NO_PROXY set and NO_PROXY currently includes *.amazonaws.com. So, i technically want all other aws cli commands to skip proxy except for one command where i want to force using proxy.
I tried removing amazonaws.com from NO_PROXY list just before executing the command but that looks more like a hack than a proper solution.
Thanks