Skip to content
This repository was archived by the owner on Jul 31, 2025. It is now read-only.

Conversation

@omeid
Copy link

@omeid omeid commented Mar 17, 2018

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:

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 is the same.

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.
@omeid
Copy link
Author

omeid commented Apr 22, 2018

@jasdel What needs to be done to get this merged? This is blocking creating read replicas in the same region with terraform :(

@jasdel
Copy link
Contributor

jasdel commented Apr 24, 2018

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.

Copy link
Contributor

@jasdel jasdel left a 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.

@omeid
Copy link
Author

omeid commented Apr 25, 2018

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

@jasdel
Copy link
Contributor

jasdel commented May 30, 2019

Created #2631 with unit tests for this bug fix.

@jasdel jasdel closed this May 30, 2019
@jasdel jasdel added the bug This issue is a bug. label May 30, 2019
jasdel added a commit that referenced this pull request May 30, 2019
…ons (#2631)

Fixes the RDS API client's customization to not generate a presigned URL for same region calls for CreateDBInstanceReadReplica and CopyDBSnapshot.

Update of #1847
diehlaws pushed a commit to diehlaws/aws-sdk-go that referenced this pull request Jul 2, 2019
…ons (aws#2631)

Fixes the RDS API client's customization to not generate a presigned URL for same region calls for CreateDBInstanceReadReplica and CopyDBSnapshot.

Update of aws#1847
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug This issue is a bug. needs-tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants