← Blog

Date:Fri, 4 Dec 2026 From:Thomas Gumz <thomas@lograker.app> To:You Subject:

Your whole EC2 fleet, in one Stream

Remember that customer?

A few weeks ago a customer asked me whether LogRaker could follow the EC2 instances behind their load balancers, the ones that come and go all day as their Auto Scaling Groups grow and shrink. The honest answer back then was “not yet”, and two blog posts later I still hadn’t gotten to the actual question, because first LogRaker had to learn to sign in to AWS the way companies do and to reach servers through a jump host.

Well, LogRaker 4.0 is out. The answer is now yes! 😁

One Stream, a whole fleet

An Amazon EC2 Source signs in to AWS like the CloudWatch and S3 Sources do (IAM Identity Center, a profile or an access key, plus a role to assume if you need one), and its Streams follow a log on as many instances as you like.

Signing in to AWS
Signing in to AWS

A Stream’s Instances tab lists everything your sign-in can see in the region, sorted into Target Groups, Auto Scaling Groups, tags and the rest, and you tick what you want. Tick a whole Target Group and you get every instance in it, including the ones that join later. An instance doesn’t even have to be in a group, because LogRaker reads your tags too: switch the list to ‘Tags’, tick a value like Role = db, and you get every instance with that tag. Tick tags of two keys and you choose whether an instance needs any or all of them (the Postgres Stream further down reads Environment = production AND Role = db, for example). Or tick three single instances. That works too.

Picking a Stream’s instances
Picking a Stream’s instances

LogRaker checks the groups every 30 seconds, so when your Auto Scaling Group starts a new instance at 3 a.m., the Stream is reading it by 3:00:30 or so (give or take the time the instance takes to boot, of course).

All their lines land in one table, in time order, and the Instance column says which instance wrote each line, each one in a color of its own. Right-click a line and ‘Show Only’ hides everybody else’s lines. And while the Stream runs, the sidebar lists its instances right under it, each with its own status light and waveform, so you can tell at a glance which one is the chatty one.

One Stream, three instances
One Stream, three instances

Every instance’s clock is a little off in its own way too, so each one gets its own clock correction, and a worker whose clock runs two seconds fast doesn’t shuffle its lines in between everybody else’s (I wrote about the whole clock business a while ago).

Getting in

Of course, reading a log on an instance means LogRaker has to get onto it first, and that’s where it got interesting.

The easiest way to sign in by far is EC2 Instance Connect, which Amazon Linux and Ubuntu come with out of the box. Every time LogRaker connects, it makes a brand new key, hands the public half to AWS with your AWS sign-in, and the instance accepts it for the next 60 seconds. That’s it. No .pem file to keep track of, nothing to rotate, and if your company signs you in with MFA, that covers the instances too. (A private key works as well, if you’d rather.)

There’s one little catch with a key that only lasts a minute, though. Before LogRaker signs in to an instance it has never met, it first has to decide whether to trust it (more on that below), and that can take a while, especially when it’s waiting for you to click a button while you’re getting coffee… So LogRaker makes the key only after that’s settled.

Then there’s the network. Instances behind a load balancer usually only have private addresses, which is exactly why jump hosts came first. A VPN works too, and so does a public address if your instances have one. But AWS has a neater way, an EC2 Instance Connect Endpoint: you create one in a VPC, and from then on you reach its instances on their private addresses through it, without a VPN or a bastion host.

Getting onto the instances
Getting onto the instances

Under the hood that’s a WebSocket to the endpoint, signed with your AWS sign-in, and the SSH connection rides inside it, end to end, just like through a jump host. LogRaker talks SSH on its own instead of running ssh, so it opens that WebSocket itself too, with NIOWebSocket from Apple’s swift-nio.

The fine print

AWS has a couple of rules for those endpoints, and they’re not up for negotiation.

One endpoint per VPC, and it takes 20 connections at once. Period. LogRaker uses one connection per instance, however many of its Streams read it, but if you want to tail 50 web servers in one VPC through an endpoint… that’s not going to happen. Past 20, the extra instances say they’re waiting for the endpoint and connect as soon as a connection frees up (and connections other people open through the same endpoint count too). For a bigger fleet, a jump host or a VPN has no such limit, and if your instances already send their logs to CloudWatch, a CloudWatch Stream reads them without connecting to any instance at all.

The other rule: AWS hangs up on every connection through an endpoint after one hour. So a few minutes before that, LogRaker opens a new one and moves the Stream over, without a gap.

Trust, but verify

Every SSH server has a host key, and the first time ssh meets a server, it shows you the key’s fingerprint and asks whether you trust it. But let’s be honest… nobody ever actually compares those fingerprints. Everybody types “yes” and gets on with their day. And with a fleet, where a new instance can show up any minute, a prompt for every single one of them would get old really fast.

So LogRaker asks AWS instead. When an EC2 instance starts for the first time, it prints its host key fingerprints to its console, and your AWS sign-in can read that console output. Before LogRaker connects to a new instance, it compares the key the instance shows with the fingerprint AWS has for it. They match? Then it connects without asking you anything. If they don’t, something’s off (someone may be sitting between you and your instance), and LogRaker stops and warns you. And if AWS has no fingerprint for it (not every image prints them, and your sign-in needs ec2:GetConsoleOutput to read them), LogRaker trusts the key it’s shown, the way ssh does with StrictHostKeyChecking=accept-new, and the instance’s ‘Details’ say it was accepted without a check.

That’s what makes the 3 a.m. thing above actually work. Nobody has to be awake to click ‘Trust’.

If you’d rather decide yourself, tick ‘Ask before trusting new instances’ in the Source editor sheet. Then the new instances of a Source come together in one trust sheet, something like “Trust 5 new instances of Production?”, with each one’s address and fingerprint, and one click on ‘Trust’ takes care of all of them.

One sheet for all the new instances
One sheet for all the new instances

Either way, LogRaker remembers each key by instance ID, not by address, because Auto Scaling hands the same private addresses to new instances over and over, while an instance ID is never used twice. And one it hasn’t seen in 30 days is forgotten, since a terminated instance never comes back anyway.

The Instances page

With instances coming and going all day, I wanted one place to see what’s actually going on. Select an Amazon EC2 Source, click ‘Instances’ above its Streams, and there’s every instance its Streams read, under the group it’s in, with what AWS says about it (a Target Group’s health check, for example) and how reading it goes: Connected, Waiting, Key declined, and so on.

You can look at it three ways. The list is the plain one, and any tag can get a column of its own there (Team, in this one):

The Instances page as a list
The Instances page as a list

The map shows which Stream reads which group, and which instances each group holds:

As a map
As a map

And the diagram draws each group as a box with its instances inside, joined to your Mac by the Streams that read them:

As a diagram
As a diagram

Click ‘Details’ on any instance for its addresses, zone, launch time and tags, and when the page gets busy, ‘Filter’ narrows it down to the instances with the tags you pick.

Those screenshots, by the way, come from a little make-believe online shop I built in my own AWS account, with web, api and worker servers in Auto Scaling Groups behind a load balancer, a database with a replica, plus a staging copy of the web, api and worker servers, all writing made-up logs. It deletes itself six hours after I start it up, because I know myself, and a surprise AWS bill for a fleet I forgot about is not a gift I need.

A few more things

A Monitor watching an EC2 Stream can count only the lines of instances with certain tags, so “tell me about errors, but only from role = web” is a couple of clicks. Shortcuts gets each instance’s ID, Name and tags, the MCP Server tells AI agents which instance a line came from, and the sidebar’s new Search field finds an instance by its ID, its address or a tag’s value.

Next on my list is AWS Systems Manager Session Manager, so your instances won’t even need to let SSH in.

So, if you run anything on EC2, give LogRaker 4.0 a try. All the details are in the docs for Amazon EC2 Sources, Instance Connect Endpoints, the Instances page and Monitors by tag.

Thanks for reading!