Infrastructure
There is presently a chicken & egg situation with the CloudFront-Auth Lambda and the CloudFront distribution both requiring TF outputs from each other. Work-around at this time is to just:
- Run the terraform with a fake lambda
- Kick off the lambda build pipeline to create a lambda with the correct config
- Rerun the terraform with the correctly built package.zip in place.
Terraform infrastructure
cd src/terraform/env/prod
terragrunt init
terragrunt plan
terragrunt apply
Content
Content is filed in a dedicated AWS CodeCommit repo.
Check out that repo as per the usual CodeCommit instructions. Then:
1 Edit content & serve locally
cd .
invoke livereload &
# vi content/articles/build-and-deploy.md
# fg
# ^C
2 Check for Broken Links
ToDo: Move this to the publishing CD/CD pipeline
cd .
invoke build
TPID=$(mktemp)
nohup invoke serve > /dev/null 2>&1 & echo $! > "${TPID}"
linkchecker http://localhost:8000/
echo $?
kill $(cat "${TPID}")
3 Publish
Commit the content to main and push it up to CodeCommit to activate the CI/CD publishing pipeline.