aws-iam-autenticator problem when downloading go client libary

9/14/2020

I'm trying to connect to AWS EKS cluster using lambda written with Go.

My import looks like that:

  import (
    	"encoding/base64"
    	"fmt"
    
    	"github.com/aws/aws-sdk-go/aws"
    	"github.com/aws/aws-sdk-go/aws/awserr"
    	"github.com/aws/aws-sdk-go/aws/session"
    	"github.com/aws/aws-sdk-go/service/eks"
    	"github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token"
    )

My actual code which requires import of github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token package is the following:

gen, err := token.NewGenerator(false)
	if err != nil {
		panic(err)
	}

However, when I'm using go get command, I'm getting this error.

go get github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token
go: found github.com/kubernetes-sigs/aws-iam-authenticator/pkg/token in github.com/kubernetes-sigs/aws-iam-authenticator v0.5.1
go get: github.com/kubernetes-sigs/aws-iam-authenticator@v0.5.1: parsing go.mod:
        module declares its path as: sigs.k8s.io/aws-iam-authenticator
                but was required as: github.com/kubernetes-sigs/aws-iam-authenticator

and I'm not able to workaround it. Can you help?

-- danny.lesnik
amazon-eks
amazon-web-services
aws-sdk
go
kubernetes

0 Answers