A few misunderstandings; there is no such thing as "hosting Lambda on Cloudfront".
- Lambda functions at CDN "at the edge" are meant for working on each request of the CloudFront distribution. The restrictions apply, these Functions do not support GO
- The go cloudfront sdk is to manage cloudfront services
- If you want to access a Lambda function from "everywhere", may be you are looking for Lambda function urls: https://docs.aws.amazon.com/lambda/latest/dg/urls-invocation.html
- Usually you would use API Gateway to access Lambda functions.
More to using GO Lambda on AWS: https://www.go-on-aws.com/