How to have client applications start/stop EC2 instances


I am working on a project which uses VR for architectural visualization, and we are wanting to use AWS EC2 instances with CloudXR to run applications for clients, however, these would need to be remotely started and stopped when the clients are using or not their app. It would be ok to have 1 client per EC2 instance, as each app would be unique, so a manual process of creating and setting up an EC2 instance per client is how I see it working for now, but it couldn't stay running, as they will only be using the app perhaps a few hours a week.

I am not sure how to go about this, and I haven't been able to find what I'm looking for so far, so any pointers would be greatly appreciated.


asked 2 years ago500 views
1 Answer

There are a lot of ways to do what you're asking; the short version is: Use the EC2 API to start/stop the instances that you need on a schedule that is required by your clients. But that opens a can of worms in terms of what the schedule is; what the client needs are; and so on.

Something that might help. Many moons ago I wrote a blog post which allowed end-users (after authenticating with Active Directory) to control their Workspaces instances without having to log into the AWS console.

It's not exactly the use case you're looking for but it can be customised: You don't have to use AD; you could just use Cognito to authenticate clients. You can change the Workspaces APIs for EC2 APIs. And so on.

profile pictureAWS
answered 2 years ago
  • Thanks for your reply. Your blog seems like it will be very helpful. If I am able to get it set up that could definitely work, at least as a solution for now.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions