For Windows instances
A Gurobi license depends on the primary volume. So, for Windows, use an Elastic Block Store (EBS) volume for your primary volume (C:), and the license should remain valid.
For Linux instances
A Gurobi license depends on the primary network interface, which may change in a default configuration. To prevent this, assign an Elastic Network Interface (ENI) as the primary network adapter for the EC2 instance. With an ENI, the Gurobi license will continue to work, since the network interface persists for the machine running Gurobi. Here are the steps to do this:
- Create a new ENI
- Attach the ENI to your AWS EC2 instance
- Start your AWS EC2 instance
- Install the license using
Detailed instructions are available in the attached PDF.
Regardless of operating system, it's easiest to start and stop the EC2 instance, rather than creating a new instance each time.
grbgetkeyto upgrade the number of cores (up to the licensed number of cores).