Update CloudFormation template. (#435)

* Update CloudFormation template.

* Inline Lambda code into CloudFormation template.
read x-distribution-name header in TileJSON response if PUBLIC_HOSTNAME is not set.

* include both build-zip and build-cloudformation-stack in CI
This commit is contained in:
Brandon Liu
2024-09-02 15:10:12 +08:00
committed by GitHub
parent 2dd5bb7937
commit bcd5571ba5
6 changed files with 167 additions and 96 deletions

View File

@@ -0,0 +1,7 @@
import { yamlParse, yamlDump } from 'yaml-cfn';
import fs from 'fs';
const template = yamlParse(fs.readFileSync('protomaps-template.yaml','utf-8'));
const code = fs.readFileSync('dist/index.js','utf8');
template.Resources.LambdaFunction.Properties.Code = {ZipFile:code};
fs.writeFileSync('dist/cloudformation-stack.yaml', yamlDump(template));