-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AYS-508 | Kinesis Integration & Removed DynamoDB Integration (#401)
- Loading branch information
1 parent
658c407
commit 9795353
Showing
5 changed files
with
41 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 0 additions & 48 deletions
48
src/main/java/org/ays/common/config/AysDynamoDBConfiguration.java
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
src/main/java/org/ays/common/config/AysKinesisConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.ays.common.config; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Profile; | ||
import software.amazon.awssdk.auth.credentials.AwsBasicCredentials; | ||
import software.amazon.awssdk.auth.credentials.StaticCredentialsProvider; | ||
import software.amazon.awssdk.regions.Region; | ||
import software.amazon.awssdk.services.kinesis.KinesisClient; | ||
|
||
@Configuration | ||
@Profile("kinesis") | ||
public class AysKinesisConfiguration { | ||
|
||
@Value("${aws.credentials.access-key-id}") | ||
private String accessKey; | ||
|
||
@Value("${aws.credentials.secret-access-key}") | ||
private String secretKey; | ||
|
||
@Value("${aws.kinesis.region}") | ||
private String region; | ||
|
||
@Bean | ||
public KinesisClient kinesisClient() { | ||
AwsBasicCredentials awsCredentials = AwsBasicCredentials.create(accessKey, secretKey); | ||
|
||
return KinesisClient.builder() | ||
.credentialsProvider(StaticCredentialsProvider.create(awsCredentials)) | ||
.region(Region.of(region)) | ||
.build(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
aws: | ||
kinesis: | ||
region: ${AWS_KINESIS_REGION:} | ||
credentials: | ||
access-key-id: ${AWS_KINESIS_ACCESS_KEY_ID:} | ||
secret-access-key: ${AWS_KINESIS_SECRET_ACCESS_KEY:} |