-
Notifications
You must be signed in to change notification settings - Fork 2.1k
aws/service/rds: Don't auto-sign (preSignUrl) for same region operations #1847
Conversation
AWS does not like preSignedUrl when it is not required and returns a 400 error: Error creating DB Instance: InvalidParameterCombination: Your request does not require the preSignedUrl parameter. Please remove the preSignedUrl parameter and try your request again. This commit adds the check to escape auto-sign when a request source and destination is the same region.
|
@jasdel What needs to be done to get this merged? This is blocking creating read replicas in the same region with terraform :( |
|
Thanks for taking the time to investigate and create this PR @omeid. The change looks good. I couldn't find explicit documentation that states that a call for a resource within the same region must not include a presignedURL. I'll forward this to the service's team to help improve the documentation of this feature. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change looks good, the only request I have would be to update the service/rds/customizations_test.go file to include cases for same region.
Also, if you'd prefer we can add the tests before merging this change in.
|
Thanks for the follow up. Unfort I am not immediately familiar with the test setup and it may take a while for me to fix it up, so I am keen to take your suggestion of adding tests before merging this in. Cheers |
|
Created #2631 with unit tests for this bug fix. |
Hello!
We are using an automation tool that creates read replicas of an instance in different regions, however, it results into an error if we try to create a read replica in the same region. precisely, the sdk causes an error if you indicate a source region for a replica when the source and replica is in the same region.
This commit fixes this issue.
Related issues are #1127 and #1128.
AWS does not like preSignedUrl when it is not required and returns a 400
error:
This commit adds the check to escape auto-sign when a request source
and destination is the same region is the same.