Redirect http requests to https

aws

#1

Hi,

Have a built a simple serverless node app, it’s deployed to AWS with a custom domain name & certificate.

The service works fine with a https://, but fails with http://.

Usually this is resolved by configuring a cloudFront Behaviour Viewer Policy to Redirect HTTP to HTTPS, but I can’t see how to achieve the same in serverless ?


#2

The API Gateway only supports HTTPS. There’s no HTTP support and no way to redirect HTTP to HTTPS.


#3

12 hours during reinvent changes everything… it looks like you can now put your Lambda behind an ALB which would allow you to serve it over HTTP and HTTPS.


#4

I’ll give it a go. It seems to be a reasonable requirement for serverless to configure the ALB.