Skip to content

Commit 614cbb6

Browse files
committed
updated build number
1 parent 2995f13 commit 614cbb6

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

kotlin/services/iam/src/main/kotlin/com/kotlin/iam/IAMScenario.kt

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ suspend fun assumeGivenRole(
202202
roleSessionNameVal: String?,
203203
bucketName: String,
204204
) {
205-
val stsClient = StsClient.fromEnvironment {region = "us-east-1" }
205+
val stsClient = StsClient.fromEnvironment { region = "us-east-1" }
206206
val roleRequest =
207207
AssumeRoleRequest {
208208
roleArn = roleArnVal
@@ -215,18 +215,17 @@ suspend fun assumeGivenRole(
215215
val secKey = myCreds?.secretAccessKey
216216
val secToken = myCreds?.sessionToken
217217

218-
val staticCredentials =
219-
StaticCredentialsProvider {
220-
accessKeyId = key
221-
secretAccessKey = secKey
222-
sessionToken = secToken
223-
}
218+
val staticCredentials = StaticCredentialsProvider {
219+
accessKeyId = key
220+
secretAccessKey = secKey
221+
sessionToken = secToken
222+
}
224223

225224
// List all objects in an Amazon S3 bucket using the temp creds.
226225
val s3 = S3Client.fromEnvironment {
227-
credentialsProvider = staticCredentials
228-
region = "us-east-1"
229-
}
226+
region = "us-east-1"
227+
credentialsProvider = staticCredentials
228+
}
230229

231230
println("Created a S3Client using temp credentials.")
232231
println("Listing objects in $bucketName")

0 commit comments

Comments
 (0)