Running a Zoom recording bot on t2 micro EC2 instance

Hi everyone,

Summary

I have a problem with running a docker container on t2 micro instance on EC2. It instantly exits with code 0. I’m hoping someone can help guide me on what is actually happening.

The problem:

I created a docker container that is primarily a zoom recording bot. It joins zoom meeting sessions and records the meeting.

It runs several processes: runs xfce terminal , tiger vnc, xfwm4, and eventually zoom. I ssh into my ec2 instance and start up the docker containers, and they instantly exit with code 0. I’ve logged memory consumption and it hits 80% cpu and oscillates between 0 and 80%.

Running it locally, there are no problems. Perhaps the memory usage is a bit high?

I’m looking to understand why this is happening. My first and immediate thought is that the cpu usage is too high for a t2 micro instance? I don’t know of what else could be causing this.

It is. Too small. Micro instances are good for nothing but a small script

Costs you nothing to try a larger instance, billing is by the second.

would you recommend a larger instance like t2 small ( 2 GiB)? or even larger (4 GiB+)?

Experiment until you find one that works. It costs a few cents to run ones testing. Find the size that’s stable, then use that.

I just tried t3 micro, small, medium large to no avail

I tried xlarge instance. It still fails

More power!!!

lol why do I feel like y’all just want to have me try r7a.48xlarge

P5.48xl might work

Do the docker logs contain any info?

Step 1 (really before resizing, IMO) is log output as to why it is failing

DISPLAY = :1
coach_1 | VNC_COL_DEPTH = 24
coach_1 | VNC_RESOLUTION = 1024x576
coach_1 | VNC_IP = 172.18.0.2
coach_1 | VNC_PORT = 5901
coach_1 |
coach_1 | Connect to 172.18.0.2:5901
coach_1 |
coach_1 | Start script..
coach_1 | Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined
coach_1 exited with code 0
coach_1 |
coach_1 | DISPLAY = :1
coach_1 | VNC_COL_DEPTH = 24
coach_1 | VNC_RESOLUTION = 1024x576
coach_1 | VNC_IP = 172.18.0.2
coach_1 | VNC_PORT = 5901
coach_1 |
coach_1 | Connect to 172.18.0.2:5901n

Essentially, nothing important except exit code 0

I couldnt find a way to get more verbose docker logs. The docker fails before running my python script so I’m not sure how to get those logs. One reason could be its trying to connect to a specific vnc ip?

Minimum of 60 seconds (though not a huge difference it’s still a difference)

Micro instances can sustain 5k rps for static https. That’s plenty for most static sites.

You could also try fargate and invoke it only during meeting starts to reduce cost

coach_1 | Failed to connect to session manager: Failed to connect to the session manager: SESSION_MANAGER environment variable not defined

What is the SESSION_MANAGER environment variable set to on your local env vs in your EC2 instance?

While I agree it’s a small instance, there’s no evidence the size is the cause of the problem. The OP needs to provide more information.

Well there’s the error, that’s important? It says session manager undefined. After 30 seconds of google it looks like this is linked to a desktop environment value. My guess is you’re running a headless ami and you need a desktop in some form.