As you have read, you wont be able to limit which instances are displayed in the console even with tags. You can restrict what operations a user can perform like starting and stop;ping instances. See https://aws.amazon.com/premiumsupport/knowledge-center/restrict-ec2-iam/
Multiple accounts would be the best option to achieve what you are trying to do and you can setup a multi-account environment pretty easily with Control Tower.
I dont think you can compare with AWS Academy as that seems to be a learning management system built on AWS which probably has its own mechanisms for filtering what can be seen between accounts.
One other simple thing you can do is give the professors a URL that contains the filter for their EC2 instances. For example, you can tag all of your instances with "Owner" with a value of the name of the Professor. Then give them a URL like this:
Where ProfessorName is their name.
I had a similar request from a question from a customer a while back; what I suggested is that they build a self-service portal for their users - that way they could precisely control the visibility and the actions that could be performed. But it's more work for you to do this.
In this particular case, my customer took some code I wrote as part of this blog post and modified the Workspaces component to control EC2 instead.
That said (and to repeat): It's work that you have to do. I think that Matt-B's answer is better here because you're relying on native AWS constructs so you're not maintaining anything going forward.
Thank you both for such quick replies. I was hoping I had missed an easy solution but it looks like that is not the case. I like Matt-B's idea of providing a like that is filtered. It is not a perfect solution but should work.
I find it amazing that AWS does not provide someway to limit what users can see based on tagging or some other method as it seems I am not the only one trying to do something like this. Again thank you both for your help.
How to have client applications start/stop EC2 instancesasked 14 days ago
Point subdomains to seperate EC2 instancesasked 3 years ago
Limiting Which EC2 Instances a Users Can SeeAccepted Answerasked 13 days ago
Can I use Private AMI to create a base image for Appstream application ?asked 3 years ago
I am trying to log in through the Cognito hosted UI. I don't see such a function in the example, what should I do?Accepted Answerasked a month ago
Can a SG be deployed using SSM/PS to all Ec2 instances?Accepted Answerasked 6 months ago
details of IAM role which is attached to ec2 instances with cloudshellAccepted Answerasked 4 months ago
AWS Batch limit number of instancesAccepted Answerasked 3 months ago
I am not able to ssh to EC2 instancesasked 4 months ago
Limit which IAM roles can be attached to an EC2 instance by different IAM usersasked 8 months ago