setting CGO_ENABLED=1 will end in a binary compiled, however then fails as a consequence of libs lacking when Lambda executes the binary
G
One other different can be to refactor your code to make the most of a Go native Kafka package deal like kafka package deal – github.com/segmentio/kafka-go – Go Packages. Not essentially handy, however would keep away from the CGO.
Hello there
I’ve tried, however bumped into issues, the model of kafka that the native model helps <> the confluent Kafka / CCloud…
for me the issue is sure, confluent… however certainly there’s a working how to do that, that works, doesn’t matter which exterior library is used, in the mean time I’m getting allot of do that. however none of them finish working.
not being troublesome… simply must get one working, which I can then re-use.
G
would actually recognize it if somebody that has expertise with this may be keen to leap onto zoom or groups.
G
Simply curious, have you ever checked the scale of the executable when compiling with and with out the hyperlink mode? The one compiled with linkmode ought to be considerably bigger, if not there may be one other situation.
so with CGO=1 and =0 the binary is similar dimension.
beneath is the make file,
BINARY_NAME=essential
export GOOS=linux
export GOARCH=amd64
export CGO_ENABLED=1
export AWS_REGION=af-south-1
.DEFAULT_GOAL := deploy
deploy:
go construct -o ${BINARY_NAME} .
zip -r perform.zip essential
aws lambda update-function-code --function-name "S3JSONDecomposer-Golang" --zip-file fileb://perform.zip --region=${AWS_REGION} | jq .
run:
go run ${BINARY_NAME}.go