Skip to content
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

amazonka-rds: Support DestinationRegion pseudo-parameter #661

Merged

Conversation

endgame
Copy link
Collaborator

@endgame endgame commented Oct 2, 2021

Cross-region replication on RDS is performed by making a request
against the destination region. In that request, you need to pass a
PreSignedUrl for the source region, with the DestionationRegion
parameter set to the destination region.

There are five such requests at the moment, specified by

https://github.com/boto/botocore/blob/77359646878e261eaa9debad888fc8f3b20832ef/botocore/data/rds/2014-10-31/service-2.sdk-extras.json

These specify a SourceRegion parameter because botocore rearranges
the rds requests internally, stripping SourceRegion from the request
itself and injecting a DestinationRegion parameter into the
PreSignedUrl field:

https://github.com/boto/botocore/blob/ec0eb680d6e6e753c7d7ddf0242b8ae1c3b38db5/botocore/handlers.py#L1080-L1089

Fixes #378

@endgame
Copy link
Collaborator Author

endgame commented Oct 2, 2021

@shlevy If you're still around, would be great to see if this works for you. Run scripts/generate rds from this branch to regenerate the amazonka-rds library. Otherwise I think we just merge it.

Cross-region replication on RDS is performed by making a request
against the _destination_ region. In that request, you need to pass a
`PreSignedUrl` for the _source_ region, with the `DestionationRegion`
parameter set to the _destination_ region.

There are five such requests at the moment, specified by
https://github.com/boto/botocore/blob/77359646878e261eaa9debad888fc8f3b20832ef/botocore/data/rds/2014-10-31/service-2.sdk-extras.json

These specify a `SourceRegion` parameter because botocore rearranges
the rds requests internally, stripping `SourceRegion` from the request
itself and injecting a `DestinationRegion` parameter into the
`PreSignedUrl` field:

https://github.com/boto/botocore/blob/ec0eb680d6e6e753c7d7ddf0242b8ae1c3b38db5/botocore/handlers.py#L1080-L1089

Fixes brendanhay#378
@endgame
Copy link
Collaborator Author

endgame commented Oct 2, 2021

Given #379 , this extra field is probably completely useless unless you sub in a different signer by hand, so it's probably worth merging now and fixing the rest later.

@endgame endgame added this to the 2.0 RC 1 milestone Oct 2, 2021
@brendanhay
Copy link
Owner

@endgame Makes sense, :shipit:

@endgame endgame merged commit efec11b into brendanhay:develop Oct 2, 2021
@endgame endgame deleted the rds-cross-region-pseudoparameter branch October 2, 2021 19:01
@shlevy
Copy link
Contributor

shlevy commented Oct 7, 2021

@endgame Apologies, not using amazonka in active projects at the moment

@endgame
Copy link
Collaborator Author

endgame commented Oct 7, 2021

@shlevy no worries, thanks for stopping by.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RDS.CreateDBInstanceReadReplica missing psuedo "DestinationRegion" parameter
3 participants