Created
January 4, 2024 18:23
-
-
Save micahwalter/7b5e026e3f2fd2bcbebf902937aef8ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"net/http" | |
"os" | |
"github.com/aws/aws-lambda-go/lambda" | |
) | |
func handler() { | |
url := os.Getenv("AMPLIFY_WEBHOOK_URL") | |
fmt.Printf("Sending to webhook: %s", url) | |
_, err := http.Post(url, "application/json", nil) | |
if err != nil { | |
fmt.Println(err) | |
} | |
} | |
func main() { | |
lambda.Start(handler) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment