could not import github.com/aws/aws-lambda-go/events (no package for import github.com/aws/aws-lambda-go/events)compiler

I have been importing these 2 libraries , but "github.com/aws/aws-lambda-go/lambda" works fine, but the import “github.com/aws/aws-lambda-go/events” gives error, I have tried to delete and re-install, but that didnt solve the issue either(I am on windows)
import ( "github.com/aws/aws-lambda-go/lambda" "github.com/aws/aws-lambda-go/events" )
here is my directory containing these 2 libs

And my code imports, no idea what to do

Are you only seeing that error in VS Code or are you unable to go build or go test? I’m not really familiar with modules, so maybe you’ve already tried this, but it’s my understanding the go tool resolves dependencies but the linter in VS Code might not ¯_(ツ)_/¯

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.