Simple Example of how to get the un-presigned s3 object url using the golang aws sdk v2

Viewed 19

I see lots of example on google/stackoverflow using s3client.GetRequestObject which is now removed from v2 of the sdk

    client := s3.NewFromConfig(cfg)
    params := &s3.GetObjectInput{
        Bucket: aws.String(bucket),
        Key:    aws.String(key),
    }
    req, _ := client.GetRequestObject(params)

How to get resource URL from AWS S3 in a golang

I looked through the sdk v2 examples: https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/gov2/s3/c

And nothing stands out to me as an example of how to do this.

I don't want to download, just provide a link to download

0 Answers
Related