Skip to content

After the AWS SDK for Java version 1.12.661 is upgraded to aws-sdk-java-v2 version 2.33.4, the method to replace the following code is not found. Are there any recommended examples? #6599

@gxllcl

Description

@gxllcl

Describe the bug

public AmazonS3 createEncryptionClient() {
checkEncryptionConfiguration();
SecretKey symmetricKey = new SecretKeySpec(key, "AES");
eraseKeyInHeap();

    return AmazonS3EncryptionClientV2.encryptionBuilder()
            .withEncryptionMaterialsProvider(
                    new StaticEncryptionMaterialsProvider(new EncryptionMaterials(symmetricKey)))
            .withCryptoConfiguration(new CryptoConfigurationV2().withCryptoMode(CryptoMode.AuthenticatedEncryption))
            .withEndpointConfiguration(
                    new AwsClientBuilder.EndpointConfiguration(infoConfig.getUrl(), Regions.US_WEST_2.getName()))
            .withClientConfiguration(buildConfiguration())
            .withCredentials(buildProvider())
            .withRegion(Regions.US_WEST_2)
            .disableChunkedEncoding()
            .withPathStyleAccessEnabled(true)
            .withRequestHandlers()
            .build();
}

Regression Issue

  • Select this option if this issue appears to be a regression.

Expected Behavior

aws-sdk-java-v2
version:2.33.4

offring the method to replace the above code

Current Behavior

null

Reproduction Steps

null

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.33.4

JDK version used

java JDK 21

Operating System and version

null

Metadata

Metadata

Assignees

No one assigned

    Labels

    response-requestedWaiting on additional info and feedback. Will move to "closing-soon" in 10 days.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions