ammobin.ca rebuilt on AWS serverless technologies using AWS-CDK
- create aws account + configure cli (set region to ca-central-1) + create profiles for each region + stage
- install node 16 + cdk
export publicUrl=<your site domain aka ammobin.ca>
npm run build
(for each region + stage)
region=us-west-2 npx cdk bootstrap --profile beta-us
region=us-west-2 site_region=US stage=beta npx cdk deploy IamStack --profile beta-us
cdk deploy GrafanaIamStack (optional) ?
cdk deploy AmmobinPipelineStack
(get all AGW + CF resources)
cdk deploy Route53 (TODO not yet)
- custom name DNS validation (route53 needs its own stack in root)
- copy down acm dns validation check from build output
- set up cname from api. to 'Target Domain Name' from custom domains tab on api gateway. set a short TTL on it (for easier turn around time debugging if things go wrong))
- daily nuxt generate + s3 upload -> github pages + actions (see https://github.com/ammobinDOTca/s3-bucket/blob/master/.github/workflows/main.yml)
- elasticsearch endpoint for log exporter to send stuff to (see https://ramsay.xyz/2018/10/13/how-to-secure-elasticsearch-with-caddy.html)
ammobin-client is too large to be uploaded as a lambda
https://aws.amazon.com/elasticloadbalancing/pricing/ => $20 a month before any network costs
update arch diagram
arm lambdas
do route53 stack -> move to cloudflare instead? revisit cache headers
- beta + prod accounts
- domain
- github secret
- webhooks
- repo commit status (even for public)
- accounts
- route53 config
- run nuxt within lambda -> remove images from zip
- cold starts for api/graphql lambdas (webpack helped a lot -> smaller packages, and 600ms reduced boot time)