Skip to content
22K
Console
Blog

Go runtime support

JayDecember 20, 2024

SST v3 now supports the go runtime for your Lambda functions. Golang is a great option for tasks that are more compute intensive and it also has faster cold starts. We talk about it here:

Play

You can use Go in SST by setting the runtime prop and pointing the handler to the directory with your Go function.

sst.config.ts
new sst.aws.Function("MyFunction", {
runtime: "go",
link: [bucket],
handler: "./src"
});

For more details, check out our Go example.


Also in this update:

  1. The sst dev CLI supports running your Go functions Live.

  2. You can use our new Go SDK to access linked resources in your Go functions or container applications.

    src/main.go
    import (
    "github.com/sst/sst/v3/sdk/golang/resource"
    )
    resource.Get("MyBucket", "name")

    The Go SDK does not support the clients that are available in the JS SDK.

  3. You can view Go function logs in the Console. Support for Issues is coming soon.