如何在应用程序中保留单个AWS S3会话?

In a Go 1.12 app, while dealing with AWS S3, for an insertion or deletion action each time creating new session object will be bad idea, can someone help sharing how can we create only single session throughout the app? Tried below sample code to generate bigS3 object at app bootup:

var bigS3 *s3.S3

func main() {
    sess, awsSessionErr := session.NewSession(&aws.Config{
        Region:      aws.String(awsRegion),
        Credentials: credentials.NewStaticCredentials(awsAccessKeyID, awsSecretAccessKey, awsSessionToken),
    })
    isError(awsSessionErr, "Error creating aws session: ")
    bigS3 := s3.New(sess)
    _, awsListBucketErr := bigS3.ListBuckets(nil) //Used to just built the session
    isError(awsListBucketErr, "Unable to list AWS bucket(s): ")
}

Then tried using it like below in other function, but it fails as bigS3 in below method is nil.

func listObjectsInsideBucket(bucketName string) {
    resp, awsListObjectsErr := bigS3.ListObjects(&s3.ListObjectsInput{Bucket: aws.String(bucketName)})
    isError(awsListObjectsErr, "Unable to list items in bucket.")
}

bigS3 := s3.New(sess) assigns the value to a new variable local to the function, not the one you want. Change it to:

bigS3 = s3.New(sess)

and the value won’t be nil any more.