Skip to the content.

AWS test CD baked localhost SITE_URL into Lambda

Symptom

Live portfolio-test HTML advertises runtimeConfig.public.siteUrl (and og/canonical) as http://localhost:4200 while the app is served from https://….execute-api.us-west-2.amazonaws.com.

Cause

cd-aws.yml passed SITE_URL: $. When GitHub Environment test left SITE_URL unset, SAM parameter SiteUrl (Lambda SITE_URL / NUXT_PUBLIC_SITE_URL) became localhost. buildSamParameterOverrides('test') also defaulted to the same localhost value and only enforced HTTPS for production.

Local npm run e2e:regression never hits execute-api + Lambda env, so it stayed green.

Fix

Prevention