Skip to content

Commit

Permalink
add sns client configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mrFlick72 committed Aug 30, 2024
1 parent 1df22db commit fa17d4d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/kotlin/com/vauthenticator/server/config/AwsConfig.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import software.amazon.awssdk.services.dynamodb.DynamoDbClient
import software.amazon.awssdk.services.kms.KmsClient
import software.amazon.awssdk.services.lambda.LambdaClient
import software.amazon.awssdk.services.s3.S3Client
import software.amazon.awssdk.services.sns.SnsClient
import java.net.URI
import java.util.*

Expand All @@ -33,6 +34,14 @@ class AwsConfig {
.build()
}

@Bean
fun snsClient(
awsCredentialsProvider: AwsCredentialsProvider,
@Value("\${aws.sns.endpointOverride:}") endpointOverride: String
): SnsClient = SnsClient.builder().credentialsProvider(awsCredentialsProvider)
.applyMutation { setEndPoint(endpointOverride, it) }
.build()

@Bean
fun s3Client(
awsCredentialsProvider: AwsCredentialsProvider,
Expand Down

0 comments on commit fa17d4d

Please sign in to comment.