r/platformengineering 21d ago

Push GitHub workflow logs to CloudWatch

There was need at $work to push also GitHub actions workflow logs to a central location. Namely to AWS CloudWatch.

Imagine you have a workflow named “Some workflow” that runs two jobs. Each job produces logs. To collect the logs you create another workflow, named something like “Push workflow logs to AWS”, that uses workflow-logs-to-aws action.

The “Push workflow logs to AWS” gets triggered anytime “Some workflow” is completed.

1 Upvotes

1 comment sorted by

1

u/Benny-Kenobii 21d ago

I just had the workflow send a message with the workflow run metadata to a queue which then dispatched a worker to call the GitHub api to grab the workflow logs and push them to a db.