- Download the 64-bit Linux version of
hugofrom here: https://github.com/gohugoio/hugo/releases
- Put the
hugobinary in the same directory as this repository
- Create the AWS Lambda bundle:
GOOS=linux go build main.go && zip main.zip main hugo
- This will create
main.zipwhich is your Lambda function.
When you create you Lambda function, pick a decent function timeout and memory usage. I use a 1 Minute timeout and 512MB function memory and it works for me. YYMV.
Environment variables to set
|GIT_REPO||The URL for the Git repository that hosts your Hugo blog||https://github.com/wnka/pdp80-blog.git|
|S3_BUCKET||The S3 bucket that hosts your blog||pdp80.com|
|S3_REGION||The AWS region your S3 bucket lives in||us-east-1|
|CLOUDFRONT_DISTRO||(Optional) The CloudFront that should invalidated on update||E3W5ET0Z9WW0IT|