-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[Issue 1593] Add support for AWS SDK v2 #1597
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 2.x
Are you sure you want to change the base?
Conversation
spencergibb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than if statements, create a AwsBinderDelegateV2 so there isn't a binary dependency on the V2 AWS API
eureka-core/src/main/java/com/netflix/eureka/aws/AwsBinderDelegate.java
Outdated
Show resolved
Hide resolved
| eurekaServerHttpClientFactory | ||
| ); | ||
| awsBinder = new AwsBinderDelegate(eurekaServerConfig, eurekaClient.getEurekaClientConfig(), registry, applicationInfoManager); | ||
| if(eurekaServerConfig.isUseAwsSdkV2()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works for Spring Cloud since it does not use EurekaBootStrap
| * | ||
| * @return | ||
| */ | ||
| default boolean isUseAwsSdkV2() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a default of false is great.
spencergibb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have not reviewed any of the *V2 implementations, but the bit in EurekaBootStrap and EurekaServerConfig look fine for Spring Cloud Netflix
Adds support for AWS SDK v2. AWS SDK v1 is enabled by default, but the new SDK will be used by setting the config useAwsSdkV2=true
The new AWS classes handle region differently than the old.
Old behavior was to check if region is us-east-1 (default) and then override the endpoint URI for each service if it was different.
New code always sets the region based on region from configuration file, unless that value is blank.