Securely Triggering a Private Jenkins Using GitHub Webhooks, API Gateway (Public), and Lambda (Private)
dev.to·2d·
Discuss: DEV
🌐Axum
Preview
Report Post

In real production setups, one rule is very clear: Jenkins should never be exposed to the internet.

At the same time, GitHub Webhooks can only hit public endpoints.

So the obvious question becomes:

How do we accept GitHub webhooks from the public internet and still trigger a private Jenkins safely?

This is a problem I recently worked on, and in this post I’ll walk through the exact approach that worked in production, including one important API Gateway setting that breaks the entire flow if you miss it.

The Idea Behind the Architecture

The core idea is simple:

Let API Gateway be the only public-facing component

Keep Lambda and Jenkins private

Validate everything before Jenkins is triggered

Here’s the flow:

GitHub (Public)
|
| HTTPS Webhook
v
API Gateway (Public REST API)...

Similar Posts

Loading similar posts...