Skip to content

Instantly share code, notes, and snippets.

Created July 16, 2022 02:10
What would you like to do?
func (s Service) PresignV2(key string) (string, error) {
req, _ := s.S3.GetObjectRequest(&s3.GetObjectInput{
Bucket: aws.String(s.Bucket),
Key: aws.String(key),
signedURL, err := req.Presign(time.Minute)
if err != nil {
return "", fmt.Errorf("s3.SignKey(): %v", err)
return signedURL, nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment