AWS S3 asset management with nakama error

Hi,
lately i’m trying to use nakama to upload images to my game app (to allow users to update their profile picture)
and for that i tried to follow the nakama instruction on asset management with golang framework,
i have created protobuf and added the credentials to ~/.aws/credential,
installed the libraries needed ( protobuf, nakama-common, aws-sdk-go)
and imported it to my go.main code like this:

import (
“strings”
“bytes”
“context”
“database/sql”
“time”
“fmt”
“errors”
“/example.com/go-project/heroiclabs.com/nakama-amazon-s3/api”
“/github.com/aws/aws-sdk-go/aws”
“/github.com/aws/aws-sdk-go/aws/credentials”
“/github.com/aws/aws-sdk-go/aws/session”
“/github.com/aws/aws-sdk-go/service/s3”
“/github.com/aws/aws-sdk-go/service/s3/s3manager”
“/github.com/golang/protobuf/jsonpb”
“/github.com/heroiclabs/nakama-common/runtime”
)

i run go mod vendor and go build --trimpath --mod=vendor --buildmode=plugin -o ./backend.so,
but when i try to run nakama i face this error

here is my go.mod:

module /example.com/go-project

go 1.20

require (
/github.com/aws/aws-sdk-go v1.51.5
/github.com/golang/protobuf v1.5.0
/github.com/heroiclabs/nakama-common v1.28.1
/google.golang.org/protobuf v1.31.0
)

require /github.com/jmespath/go-jmespath v0.4.0 // indirect

i use nakama 3.17.1+258a7f35
golang go version go1.20.8 linux/amd64

As stated elsewhere, please have a look at Dependency Pinning - Heroic Labs Documentation.

yes i read dependency pinning page, it’s most likely that, but it refers to path/filepath package which i don’t know where it’s located. do you have any information on path/filepath packages of go ???

or how i should know which version of aws sdk is compatible with nakama 3.17 ??? is there a way to check?

That’s a stdlib package, there may be a mismatch between the Go versions that are being used to build the Plugin and what was used to build Nakama. How are you building the Plugin? Are you using Docker or building locally?

i don’t use docker, i build locally.

Please try to build Nakama 3.17.1 from source locally as well and load your plugin there.

i think the last version of aws sdk is built with go 1.19 and i’m using go 1.20.8, if i downgrade my go version to 1.19 which nakama version should i use?

I see, the issue is that Nakama 3.17.1 requires go 1.20 I believe. Perhaps you should upgrade the aws lib to github.com/aws/aws-sdk-go-v2.