-
Notifications
You must be signed in to change notification settings - Fork 711
Closed
Labels
guidanceQuestion that needs advice or information.Question that needs advice or information.
Description
Confirm by changing [ ] to [x] below:
- I've gone though the API reference
- I've checked AWS Forums and StackOverflow for answers
Describe the question
I'm not sure if this is a question or indeed a bug, because the API has changed considerably since v0.24. I'm getting a SignatureDoesNotMatch error when running the example program below:
package main
import (
"context"
"io/ioutil"
"log"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"
"github.com/aws/aws-sdk-go-v2/service/s3"
)
func main() {
cfg, err := config.LoadDefaultConfig()
if err != nil {
log.Fatal(err)
}
client := s3.NewFromConfig(cfg)
output, err := client.GetObject(context.Background(), &s3.GetObjectInput{
Bucket: aws.String("my-bucket"),
Key: aws.String("my-file.csv"),
})
if err != nil {
log.Fatal(err)
}
b, err := ioutil.ReadAll(output.Body)
if err != nil {
log.Fatal(err)
}
log.Printf("%s", b)
}
The go.mod file:
module github.com/InstaGIS/s3test
go 1.15
require (
github.com/aws/aws-sdk-go-v2 v0.29.0
github.com/aws/aws-sdk-go-v2/config v0.2.2
github.com/aws/aws-sdk-go-v2/service/s3 v0.29.0
)
Output error: api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
I'm missing something? Any help would be appreciated :)
Metadata
Metadata
Assignees
Labels
guidanceQuestion that needs advice or information.Question that needs advice or information.