BREAKING: Request presigning #925
ianbotsf
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
An upcoming release of the AWS SDK for Kotlin changes the method signatures for presigning requests. This change simplifies presigning in the simplest cases and adds new capabilities for advanced presigning use cases but affects all existing presigning code.
Note: If you do not presign AWS SDK API requests then this change should not affect you.
Release date
This feature will ship with the v.0.26.0-beta release planned for 5/25/2023.
What's changing
Functions for presigning requests were previously extension methods on the request objects (e.g.,
GetObjectRequest.presign
). They accepted either a service client config object (e.g.,S3Client.Config
) or a service-specific presigning config object (e.g.,S3PresignConfig
) to pass parameters necessary for presigning. These methods were found to be cumbersome and require additional resource handling or complex codegen.They are being replaced with extension methods on service clients (e.g.,
S3Client.presignGetObject
) which eliminates the need to pass in service-level config as a parameter. There are two overloads: one that takes a duration as a required parameter and another which takes anAwsSigningConfig
builder to control more advanced signing configuration.How to migrate
Migration steps depend on use case:
Presigning via service client config
Previously, service client config could be used to presign requests like this:
After this change, presigning will be invoked like this:
Presigning via presign config
Previously, a more advanced set of presigning options could be configured like this:
After this change, most of this configuration will be read from the service client instead. The signer instance itself can be passed as an optional parameter to the presign request:
Additional resources
If you have any questions concerning this change, please feel free to engage with us in this discussion. If you encounter a bug with these changes, please file an issue.
Beta Was this translation helpful? Give feedback.
All reactions