Reputation: 409
We are trying to test decryption login in local using a profile based credentials setup. I was using KMSMasterKeyProvider.withCredentials
along with ProfileCredentialsProvider
.
In doing so, I realised that aws-encryption-sdk-java
2.3.3
version internally uses aws-java-sdk
1.x
version. This is sort of deadlock as we are already on aws-java-sdk
2.x
Any suggestions as to how we can overcome this? Interesting that how Amazon still hasnt migrated aws encryption sdk completely to 2.x
.
Upvotes: 0
Views: 893
Reputation: 33374
AWS Encryption SDK for Java IS NOT a part of the AWS SDK for Java. Neither 1.x, nor 2.x. They have different release cycles. Thus, version 2.3.3
of the AWS Encryption SDK for Java doesn't mean that you are using AWS SDK for Java 2.x.
Even in the README they say:
You don't need an Amazon Web Services (AWS) account to use the AWS Encryption SDK, but some of the example code require an AWS account, an AWS KMS key, and the AWS SDK for Java 1.x. (The AWS Encryption SDK for Java does not support the AWS SDK for Java 2.x.)
The docs repeat that:
Prerequisites
Before you install the AWS Encryption SDK for Java, be sure you have the following prerequisites.
…
AWS SDK for Java (Optional)
The AWS Encryption SDK for Java does not require the AWS SDK for Java. However, the AWS SDK for Java 1.x is required to use AWS Key Management Service (AWS KMS) as a master key provider. It's also required for some of the Java code examples in this guide. The AWS Encryption SDK for Java supports only the 1.x version of the AWS SDK for Java.
To install the AWS SDK for Java 1.x, use Apache Maven. To import the entire AWS SDK for Java as a dependency, declare it in your
pom.xml
file. To create a dependency only for the AWS KMS module, follow the instructions for specifying particular modules, and set theartifactId
toaws-java-sdk-kms
.
ALAS, you have no choice but to use AWS SDK for Java 1.x. But it should not be a deadlock or a conflict: 1.x
and 2.x
use different packages.
Upvotes: 1