Skip to content

Commit

Permalink
Move ordering of credentials chain
Browse files Browse the repository at this point in the history
  • Loading branch information
lindseydew committed Apr 9, 2024
1 parent 4661d9b commit da0f23a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ class SavedArticlesPersistenceImpl(persistanceConfig: PersistenceConfig) extends
}
private val client = DynamoDbClient
.builder()
.credentialsProvider(InstanceProfileCredentialsProvider.builder().build())
.credentialsProvider(ProfileCredentialsProvider.builder.profileName("mobile").build)
.credentialsProvider(InstanceProfileCredentialsProvider.builder().build())
.region(Region.EU_WEST_1)
.build()
//TODO confirm that it's ok to share the same client concurrently in all requests.. I guess if this is a lambda there won't be concurrent requests anyway ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class SflDynamoDb(persistanceConfig: PersistenceConfig) extends Logging {
private val table = Table[DynamoSavedArticles](persistanceConfig.tableName)
private val client = DynamoDbClient
.builder()
.credentialsProvider(InstanceProfileCredentialsProvider.builder().build())
.credentialsProvider(ProfileCredentialsProvider.builder.profileName("mobile").build)
.credentialsProvider(InstanceProfileCredentialsProvider.builder().build())
.region(Region.EU_WEST_1)
.build()
private val scanamo = Scanamo(client)
Expand Down

0 comments on commit da0f23a

Please sign in to comment.