Lessons in Serverless & AWS

This will be a running document of various random bugs and fixes I run into while learning how to build serverless apps.

Wildcard domain certificates only apply to one level.
For instance, if you have *.domain.com, it’ll only apply to x.domain.com, y.domain.com etc., but not x.y.domain.com. For that, you need *.*.domain.com. This was the solution to an annoying bug that I thought was due to CORS, but was really due to an invalid certificate (the preflight options request was being rejected on the grounds of “ERR_CERT_COMMON_NAME_INVALID”).

Some packages need to be force-included in the YML file. For instance, my-sql and pg. Why? Because those are older packages, and sls-webpack probably doesn’t recognize that dependencies are required.

Debugging on Mobile? Safari has a debugging function that allows you to see mobile logs on your laptop.

S3 Statically hosted website with HTTPS compatibility? Use Cloudfront.

Like what you read? Give Franklyn Zhu a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.