This repo will show some example for Image upload to aws S3 with golang. There are different ways to do so and it depends on the case which is the best solution.
IF you do not have the dependencies aka imports on your local machine =>
go get github.com/aws/aws-sdk-go/aws
github.com/aws/aws-sdk-go/aws/awsutil
github.com/aws/aws-sdk-go/aws/credentials
github.com/aws/aws-sdk-go/aws/session
github.com/aws/aws-sdk-go/service/s3
github.com/joho/godotenv
Documentation from AWS https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-UsingHTTPPOST.html