Note when using license manager from the Cloud:
If your license manager is running on an EC2 instance, ArcGIS Desktop will no longer be licensed if the license manager instance is restarted, as restarting the instance changes its name. The best option for licensing ArcGIS Desktop in a cloud environment like Amazon EC2 is to use a license manager that is hosted on a physical machine in your organization. Alternatively, the license manager can be hosted on a virtual machine or on a small dedicated EC2 instance that is continuously running (such as a micro size Linux instance).
Additional information can be found in the link below:
Administer your Amazon EC2 instance with Windows Remote Desktop Connection—ArcGIS Enterprise on AWS ...
If you have the license manager installed, refer to the following documentation on how configure it to work through a firewall:
Configure ArcGIS License Manager to work through a firewall—License Manager Guide | ArcGIS Desktop
The license manager uses two daemons, lmgrd.exe which uses port 27000 by default and arcgis.exe which uses a random open port. You must manually define a static port for the arcgis.exe daemon. Then open both ports through the firewall. The link above will provide details and steps to do so.