How to serve a static HTML file from s3

Hi Kong Nation!

I currently have Kong running in a kubernetes cluster serving proper API endpoints. I would like to add an endpoint that serves a static HTML file that I have in an S3 bucket. Is serving a static HTML file possible? I’ve looked at many times but I do not know how to integrate this with my kubernetes setup. I have k8s “kongfig” yaml files that I apply to the cluster - I’ve never had to work with these configuration files.

I would like to serve these static files using Kong because of the plug ins that Kong has built in, like authentication. If I can’t serve the S3 files directly, then I’ll have to write a tiny service to do it which I’d rather avoid.

Any ideas on how to serve static files from a k8s kong are greatly appreciated!


1 Like