I'm having trouble running make deploy
as instructed in the Installation section.
I've started with a relatively clean (has docker installed already but that's about it) CentOS 7 VM, and then installed AWS CLI, SAM CLI, go 1.17, and jq. I was able to create the buckets using the commands in the instructions. I ran go get github.com/gorilla/feeds
.
The instructions for getting the Go SDK were not clear so I ran a few commands that were in the Download
instructions from the Go SDK repo:
go get github.com/aws/aws-sdk-go-v2/aws
go get github.com/aws/aws-sdk-go-v2/config
I cloned this repo to ~/go/src
so it was within the go project directory
I then tried to run make deploy
from the ~/go/src/amazon-ecr-continuous-scan
folder and got
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/configs ./configs
go: cannot find main module, but found .git/config in /home/jadair/go/src/amazon-ecr-continuous-scan
to create a module there, run:
go mod init
make: *** [bconfigs] Error 1
So I ran go mod init
then ran make deploy
again. This time I got
$ make deploy
GOOS=linux GOARCH=amd64 go build -v -ldflags '-d -s -w' -a -tags netgo -installsuffix netgo -o bin/configs ./configs
configs/main.go:12:2: no required module provides package github.com/aws/aws-lambda-go/events; to add it:
go get github.com/aws/aws-lambda-go/events
configs/main.go:13:2: no required module provides package github.com/aws/aws-lambda-go/lambda; to add it:
go get github.com/aws/aws-lambda-go/lambda
configs/main.go:14:2: no required module provides package github.com/aws/aws-sdk-go-v2/aws/external; to add it:
go get github.com/aws/aws-sdk-go-v2/aws/external
configs/main.go:15:2: no required module provides package github.com/aws/aws-sdk-go-v2/service/s3; to add it:
go get github.com/aws/aws-sdk-go-v2/service/s3
configs/main.go:16:2: no required module provides package github.com/aws/aws-sdk-go-v2/service/s3/s3manager; to add it:
go get github.com/aws/aws-sdk-go-v2/service/s3/s3manager
configs/main.go:17:2: no required module provides package github.com/aws/aws-sdk-go/aws; to add it:
go get github.com/aws/aws-sdk-go/aws
configs/main.go:19:2: no required module provides package github.com/satori/go.uuid; to add it:
go get github.com/satori/go.uuid`
So then I try to pull down those packages. Most of them were successful, except for these two
$ go get github.com/aws/aws-sdk-go-v2/aws/external
go get: module github.com/aws/aws-sdk-go-v2@upgrade found (v1.8.0), but does not contain package github.com/aws/aws-sdk-go-v2/aws/external
$ go get github.com/aws/aws-sdk-go-v2/service/s3/s3manager
go get: module github.com/aws/aws-sdk-go-v2/service/s3@upgrade found (v1.12.0), but does not contain package github.com/aws/aws-sdk-go-v2/service/s3/s3manager
It looks like aws/external
got renamed to config
at some point.
I can't seem to find anything on service/s3/s3mananger
. Maybe it's feature/s3/manager
now?
I'm new to go, so any help you can provide is appreciated.