AWS Builder Center
Collect logs from anywhere, with no server to run

Collect logs from anywhere, with no server to run

Learn to collect logs from every machine in your network into one place on AWS — with no server to run, no code to deploy, and nothing to patch. Starting from scratch, this guide explains syslog, serverless, and how one incoming message can safely land in a tamper-proof archive, a live alerting view, and a searchable store at once. If you've only ever logged to a file, this is your next step. Everything is open source and free to try.

Founder at Proxylity
A longer, more architecture-focused version of this story lives on the  Proxylity blog . This version starts from the beginning — if you've never set up log collection before, start here. All the code is open source at  github.com/proxylity/syslog .


Every program you've ever run produces logs — little lines of text that say what happened. "User logged in." "Request failed." "Disk 90% full." On one laptop, logs are easy: they go in a file, you open the file, done.
The trouble starts when you have lots of machines. A company might have firewalls, switches, servers, and Wi-Fi access points across several offices, each producing logs all day. Nobody wants to log into a hundred machines to read a hundred files. So the standard move is to send every machine's logs to one place and look at them there. That one place is a log collector, and the most common way machines send logs to it is a decades-old protocol called syslog.
This post shows how to build that "one place" on AWS — without running a single server, and without writing any code that runs in the cloud. If that sounds too good to be true, stick around. By the end you'll see exactly how the pieces fit, and I think you'll be surprised how little there is to it.

First, why is running a collector a pain?

The old way to build the collector is to take a computer (or rent a virtual one in the cloud), install log-collecting software on it, and leave it running forever. That computer is a server: a machine whose whole job is to sit there waiting for work.
Owning a server sounds simple, but it quietly becomes a chore:
  • It can fill up. Logs are just files, and files take disk space. A busy day (or a misbehaving device shouting the same error a million times) can fill the disk, and then the collector stops working — usually at the worst possible moment.
  • It needs updates. Any software left running on the internet has to be patched when security holes are found. Miss a patch and you've left a door open.
  • It needs babysitting. If it crashes at 2 a.m., someone's phone buzzes. If traffic doubles, someone has to make it bigger.
That second point deserves a closer look, because it's been in the news a lot. A big share of real-world break-ins start with exactly this: an internet-facing box — a VPN appliance, a firewall, a collector — that someone forgot to patch. Attackers scan for those boxes constantly, and one unpatched machine on the edge of a network is often all it takes to get in. The uncomfortable truth is that every server you run is a door you have to keep locked.
So the real question is: what if we didn't own one at all? A door that doesn't exist can't be left unlocked.

"Serverless" means someone else runs the machines, not you

That's the idea behind serverless. The servers still exist somewhere but you never see them, patch them, or get paged about them. You just describe what you want to happen to your data, and the service makes it happen, charging you only for what you actually use. When no logs are coming in, you pay almost nothing. And there's no box of yours sitting on the internet for someone to find.
We're going to build our collector entirely out of serverless AWS pieces. Here's the shape of it, and then we'll walk through each part:
your machines
|
syslog over the network
|
v
a managed "front door"
|
one copy to each of three places:
|
+--> a safe archive
| keep everything
|
+--> a live view
| watch and get alerted
|
+--> a searchable store
ask questions later
One message comes in; three useful things happen to it. Let's take them one at a time.

The front door: receiving the logs

Syslog messages travel over the network as UDP — a simple, fast way to send small chunks of data where the sender just fires the message off and moves on. It's perfect for logs, but something still has to be listening to catch those messages. Normally that "something" is your server. We don't want a server.
So we use a managed front door that listens for us. In this build it's  Proxylity UDP Gateway  (full disclosure: that's the product my team makes, and it's what makes the no-server part possible). You tell it "listen for syslog," and it catches every incoming message at AWS's edge — no machine of yours involved. Because it's managed, it's the thing that gets kept patched and defended, not a box on your network.
It can also require each office to connect through an encrypted tunnel, using WireGuard — a modern, refreshingly simple way to encrypt a network connection. That does two things: the logs can't be read as they cross the internet, and only offices with the right key are allowed to send anything at all. Notice there's no clunky VPN appliance in this picture — WireGuard is just built into the office's router, so there's no extra box to exploit.
The important trick: the front door doesn't just catch the message, it can hand a copy to several destinations at once. That's what lets one incoming log line do three jobs without any code gluing it together.

Job 1: keep everything, safely (the archive)

The first copy goes straight into Amazon S3, AWS's storage service — think of it as an infinite hard drive you never have to manage. We keep the message exactly as it arrived, untouched.
Here's the neat part. We turn on a feature called S3 Object Lock, which makes stored files read-only for a set amount of time — say a year. Once a log is written, nobody can quietly edit or delete it, not even the account owner. This is called WORM storage: Write Once, Read Many.
Why bother? Think back to the break-ins. When attackers get into a system, one of the first things they often do is delete or edit the logs to hide what they did — if the only record of the intrusion is a file they can rewrite, the evidence vanishes. Lock the logs so they can't be changed, and that trick stops working: the archive becomes a record you can actually trust. (Certain industries are legally required to store logs this way, but you don't need to know the rulebooks to see that "logs nobody can tamper with" is just a good idea.)

Job 2: watch what's happening right now (the live view)

The second copy goes into Amazon CloudWatch Logs, which is built for looking at logs as they arrive. Along the way, the message gets tidied from raw syslog text into neat, labeled fields (which device, how serious, what it said), so it's easy to read and search.
Once logs are flowing into CloudWatch, you can set up alarms — automatic watchers that email you when something matters. A few examples this build sets up for you:
  • A serious error shows up ("severity critical").
  • An office goes quiet (its logs stop arriving — maybe its connection dropped, which is also worth knowing about from a security standpoint).
  • Garbled data starts coming in.
You didn't write any of that logic. You described which conditions matter, and AWS watches for them.

Job 3: ask questions later (the searchable store)

The third copy is saved in a form built for asking questions across lots of data — things like "how many errors did each office have, by hour, last week?" It's stored efficiently in S3 and queried with Amazon Athena, which lets you run ordinary SQL (the standard language for querying data) right over your logs. No database to run; you just ask, and pay a tiny amount for the question.
So the live view (Job 2) is for right now, and this store (Job 3) is for looking back over months of history cheaply — which is exactly what you need when you're investigating something that started weeks ago.

What did we actually have to build?

Here's the punchline. To stand all of this up, you don't write a program. You fill in two small settings files:
  1. Settings — how long to keep logs, who to email on alarms, and so on.
  1. A list of your offices — one line each, with a key that both identifies that site and encrypts its connection.
Then you run one deploy command (using AWS CDK, a tool that turns a short description into real AWS resources), and AWS builds the whole thing for you. Adding a new office later is one more line in the list and another deploy. There is no collector to size, no disk to watch, and — the theme of this whole post — no server to patch.
# The entire list of offices — add a line, deploy, done.
{
"Peers": [
{ "Name": "head-office", "PublicKey": "tObA...9pXk=" },
{ "Name": "branch-seattle", "PublicKey": "Lm4Z...2vQp=" }
]
}

What does it cost?

Because it's serverless, the bill follows your usage. When logs are trickling in, you pay cents. There's no always-on server quietly charging you 24/7 whether or not anything is happening. AWS even gives you a free tier to start, and the front door's first listener and first million messages each month are free — so a small project can genuinely cost nothing to try.
If you ever get chatty, there's a simple lever: you can tell the front door to drop the boring low-priority messages (routine "info" chatter) before they're ever stored, while still keeping everything in the cheap archive. Expensive processing only for the messages that matter; cheap storage for the rest.

Feeling inspired? Build your own in a weekend

If this gave you the "wait, I could build something like this" itch, there's a perfect place to scratch it. AWS is running a  Weekend Challenge: No Pipeline, No Problem  hackathon — the whole idea is to go from an idea to a shipped, working thing in a single weekend using serverless AWS services (Lambda, API Gateway, DynamoDB, S3, Step Functions), with no server to babysit and no pipeline to maintain. That's the exact spirit of what we just walked through.
The window is Friday, November 13 through Monday, November 16, and there are AWS promotional credits and Builder Backpacks for the winners. You bring a problem worth solving; serverless handles the heavy lifting. If reading this made the no-server approach click, that's the weekend to try it on something of your own.

Try it yourself

This is the part I really want you to take away: you can build this today. Everything is open source and ready to deploy into your own AWS account — the deploy files, the office list, setup recipes for common routers (Linux, OpenWrt, rsyslog), and ready-made example queries.
Clone it, add one office, send a test message, and watch it land in all three places. No server. No code. No box on the internet to keep patched. If you've only ever put logs in a file on one machine, this is a great next step — and it scales from your hobby project to a hundred offices without changing the shape of anything.
Want the deeper, architecture-level version with the full security and cost details? It's on the  Proxylity blog .
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article