-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue Generating PreSignedURL #1098
Comments
Hello @stack72, thank you for reaching out to us. I'll take a look into this. Once I am able to replicate it, I'll post back here. Can you post what your input looks like? |
@stack72 - I am unable to reproduce this, and behaves properly from what I can tell. Here is my source package main
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/rds"
)
func main() {
sess := session.New((&aws.Config{
Region: aws.String("us-east-1"),
}).WithLogLevel(aws.LogDebugWithRequestRetries | aws.LogDebugWithRequestErrors))
svc := rds.New(sess)
req, out := svc.CreateDBInstanceReadReplicaRequest(&rds.CreateDBInstanceReadReplicaInput{
DBInstanceIdentifier: aws.String("fooinstance"),
SourceDBInstanceIdentifier: aws.String("arn to instance"),
SourceRegion: aws.String("us-west-2"),
KmsKeyId: aws.String("us-east-1 key arn"),
})
url, err := req.Presign(time.Minute * 5)
fmt.Println(url)
fmt.Println(err)
fmt.Println(out)
} Please let me know if you any issues with that example. |
thanks for this - so there is no need to run the req.Send()? P. |
@stack72 - If you are just looking to use the presigned URL, you do not need to send the request :). |
got it - let me try that now Will report back within the hour or so Thanks for this |
@xibz you are correct - that fixes my issue :) Thanks so much! |
@xibz ok, this code works but it doesn't actually create the replica - we just go into a waiting pattern for it to actually get deployed and nothing happens: The code looks as follows now:
The responses are as follows:
The output is empty Does your code actually create the replica? or just happen to do the same thing? |
@stack72 - Yea, that just returns the URL. You must |
Hi @xibz When i do the following now:
The response from the http.Get returns the following:
Any reason why the presigned url above would return a 400? Is it because my opts being passed to the Request have more than the 4 fields you have above? |
@stack72 - What go version are you using? Can you provide what your input looks like when calling |
ok, so by only supplying the 4 options as follows:
I then get a URL that returns a 200 response
But the output from the request is still empty at this point so, no replica is being created:
|
The output is not going to be populated due to it not being unmarshaled from the |
yes i see it being created now - thanks! |
Yep! No problem @stack72. If you run into any other issue, please feel free to reach out :) |
Hi, I am trying to add support to Terraform for Cross Region Encrypted Replicas in RDS
I have the following code:
The request looks as follows:
The response is as follows:
This seems to be a similar issue to this
Any thoughts on what I seem to be doing wrong here?
Thanks
Paul
The text was updated successfully, but these errors were encountered: