python doesn't seem to work, let's see how go handles things
This commit is contained in:
parent
f9520551be
commit
d27d1b3034
@ -1,2 +0,0 @@
|
||||
def handler(event, context):
|
||||
return {"Hello": "world!"}
|
5
go.mod
Normal file
5
go.mod
Normal file
@ -0,0 +1,5 @@
|
||||
module app
|
||||
|
||||
go 1.22
|
||||
|
||||
require github.com/aws/aws-lambda-go v1.29.0
|
20
main.go
Normal file
20
main.go
Normal file
@ -0,0 +1,20 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"github.com/aws/aws-lambda-go/lambda"
|
||||
)
|
||||
|
||||
type MyEvent struct {
|
||||
Name string `json:"name"`
|
||||
}
|
||||
|
||||
func HandleRequest(ctx context.Context, name MyEvent) (string, error) {
|
||||
return fmt.Sprintf("Hello %s!", name.Name), nil
|
||||
}
|
||||
|
||||
func main() {
|
||||
lambda.Start(HandleRequest)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user