Ray Clusters with AWS IAM roles

How severe does this issue affect your experience of using Ray?

  • None: Just asking a question out of curiosity

I am wondering about using Ray clusters with AWS EC2 instances and how IAM roles play into this. Our company provides reserved EC2 instances to us under a specific IAM role. If I give Ray access to that IAM role, will it use the existing EC2 instances of the same type, or will it spin up new spot instances?

Is there any way to go about using this strategy for using “reserved” EC2 instances with Ray? The cost is much lower (because we know what to reserve), and it makes it a lot easier with our security team if they know we are not spinning up new instances all the time.

I am also wondering how this works. It seems ray uses the role in this form:

arn:aws:sts::****:assumed-role/ray-autoscaler-v1/i-04284d53b8c931de7

…even if you pass it an instance profile. How do we give force ray to use the assigned role?