You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
internalexpectclassSdkIOException : Exception// FIXME move this to the proper place when we do the larger KMP Exception refactor
33
+
27
34
/**
28
35
* [CredentialsProvider] that uses EC2 instance metadata service (IMDS) to provide credentials information.
29
36
* This provider requires that the EC2 instance has an [instance profile](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/iam-roles-for-amazon-ec2.html#ec2-instance-profile)
@@ -43,8 +50,16 @@ public class ImdsCredentialsProvider(
CODE_ASSUME_ROLE_UNAUTHORIZED_ACCESS->throwProviderConfigurationException("Incorrect IMDS/IAM configuration: [${resp.code}] ${resp.message}. Hint: Does this role have a trust relationship with EC2?")
@@ -98,4 +142,13 @@ public class ImdsCredentialsProvider(
Copy file name to clipboardExpand all lines: aws-runtime/aws-config/common/test/aws/sdk/kotlin/runtime/auth/credentials/CachedCredentialsProviderTest.kt
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -83,7 +83,7 @@ class CachedCredentialsProviderTest {
83
83
@Test
84
84
funtestRefreshBufferWindow() = runTest {
85
85
val source =TestCredentialsProvider(expiration = testExpiration)
86
-
val provider =CachedCredentialsProvider(source, clock = testClock)
86
+
val provider =CachedCredentialsProvider(source, clock = testClock, expireCredentialsAfter =60.minutes)
87
87
val creds = provider.getCredentials()
88
88
val expected =Credentials("AKID", "secret", expiration = testExpiration)
0 commit comments