-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add a possibility to handle session credentials in live
.
#353
Comments
Hello, You can use this https://github.com/zio/zio-s3/blob/series/2.x/src/main/scala/zio/s3/package.scala#L34 |
Yeah, but if You pass |
Good catch so please create a provider, and it will work def session(accessKeyId: String, secretAccessKey: String, sessionToken: String): UManaged[AwsCredentialsProvider] =
ZManaged.succeedNow[AwsCredentialsProvider](new AwsCredentialsProvider {
override def resolveCredentials(): AwsCredentials = AwsSessionCredentials.create(accessKeyId, secretAccessKey, sessionToken)
}) |
I solved your problem, you can even use |
There is currently a method called
def live(region: Region, credentials: AwsCredentials, uriEndpoint: Option[URI] = None)
which will only use theaccessKeyId
andsecretAccessKey
when authenticating. This makes it impossible to use with e.g.SessionAwsCredentials
which will return cryptic errors about keys not being present in the registry.We could either add a special handling for
SessionAwsCredentials
or add a note in the documentation about this behavior.The text was updated successfully, but these errors were encountered: