AWS Lambda to trigger Netlify build, written in Go
GOOS=linux go build main.go
zip function.zip main
The function sends a POST request to the following endpoint: https://api.netlify.com/build_hooks/{hook}
The value of hook
can come from:
- (highest priority) an event of the form :
{
"hook": "YOUR_BUILD_HOOK"
}
- the
HOOK
environment variable
Using the environment variable makes it possible to trigger the function using a CloudWatch scheduled event.