I have a jenkins host in a private subnet that i’ve configured to only be accessible via a VPN. I have a github enterprise cloud account and I would like github to be able to send webhooks to this private instance in order to kick off jenkins pipelines.
I think API Gateway would solve this issue, though I personally don’t have any experience with API gateway and maybe that is overkill
Has anyone encountered this issue before?
I tried with webhookrelay and it works. I need some solution that I can solve using AWS services like using lambda and api gateway or reverse proxy
2
Answers
Try this one https://github.com/devops-workflow/aws-lambda-jenkins-proxy is in similar way using circle, you can change it desirable repo and using api gateway +vpc link to reach private resource.
Other way to do that is using http api gw => vpc link => alb => jenkins TCP8080, but you need to secure that external api using cloudfront or waf.
I was going to use the suggestion of Joanale but ended up with a solution that used a Lambda to pass on the request to the Jenkins server. Similar solution.
Something like this: