Skip to content

Instantly share code, notes, and snippets.

View luisc009's full-sized avatar
🔄
Do DevOps!

luisc009 luisc009

🔄
Do DevOps!
  • Guadalajara, Jalisco.
  • 02:34 (UTC -06:00)
  • X @mister009
View GitHub Profile
@luisc009
luisc009 / systemd-cloudwatch-logs-tutorial.md
Created March 3, 2025 18:42 — forked from adam-hanna/systemd-cloudwatch-logs-tutorial.md
Forward systemd service logs to AWS Cloudwatch

Introduction

I often find myself ssh'ing into my servers and checking my systemd service logs with $ journalctl -f -u {name}.service. One day I got tired of this and wanted all of my important logs in once place (Amazon AWS Cloudwatch). To my dismay, there weren't any real good tutorials on how to do so. So, voilà.

Steps

Overall, it's a fairly simple process consisting of the following few steps.

1. Modify the service file

Open the service file with $ sudo vi /lib/systemd/system/{name}.service

Modify the [Service] section: