We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 761f8b5 commit 3c153bbCopy full SHA for 3c153bb
integration-sns-to-lambda/example.go
@@ -0,0 +1,26 @@
1
+package main
2
+
3
+import (
4
+ "context"
5
+ "fmt"
6
7
+ "github.com/aws/aws-lambda-go/events"
8
+ "github.com/aws/aws-lambda-go/lambda"
9
+)
10
11
+func handler(ctx context.Context, snsEvent events.SNSEvent) {
12
+ for _, record := range snsEvent.Records {
13
+ processMessage(record)
14
+ }
15
+ fmt.Println("done")
16
+}
17
18
+func processMessage(record events.SNSEventRecord) {
19
+ message := record.SNS.Message
20
+ fmt.Printf("Processed message: %s\n", message)
21
+ // TODO: Process your record here
22
23
24
+func main() {
25
+ lambda.Start(handler)
26
0 commit comments