[Java] Migrate examples module from AWS SDK v1 Kinesis to v2#505
Open
jvdadda wants to merge 2 commits intoawslabs:masterfrom
Open
[Java] Migrate examples module from AWS SDK v1 Kinesis to v2#505jvdadda wants to merge 2 commits intoawslabs:masterfrom
jvdadda wants to merge 2 commits intoawslabs:masterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Migrates the examples module from AWS SDK for Java v1 Kinesis usage to AWS SDK for Java v2, as part of the broader effort in #500 to remove AWS SDK v1 references.
Changes:
- Replaced
com.amazonaws:aws-java-sdk-kinesiswithsoftware.amazon.awssdk:kinesisin the examples module. - Rewrote
PutRecordGetRecordExampleto useKinesisClient(AWS SDK v2) and v2 request/response builders. - Removed AWS SDK v1 STS dependencies from
serializer-deserializerandmultilang-schema-registry, and updated comments/Javadocs referencing v1 credential provider naming.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| serializer-deserializer/src/test/java/com/amazonaws/services/schemaregistry/deserializers/avro/AWSKafkaAvroDeserializerTest.java | Updates test comment to reflect v2 AwsCredentialsProvider naming. |
| serializer-deserializer/src/test/java/com/amazonaws/services/schemaregistry/deserializers/GlueSchemaRegistryKafkaDeserializerTest.java | Updates test comment to reflect v2 AwsCredentialsProvider naming. |
| serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/deserializers/avro/AWSKafkaAvroDeserializer.java | Updates Javadoc wording for v2 credential provider type. |
| serializer-deserializer/src/main/java/com/amazonaws/services/schemaregistry/deserializers/GlueSchemaRegistryKafkaDeserializer.java | Updates Javadoc wording for v2 credential provider type. |
| serializer-deserializer/pom.xml | Removes unused AWS SDK v1 STS dependency. |
| multilang-schema-registry/pom.xml | Removes unused AWS SDK v1 STS dependency. |
| examples/src/main/java/com/amazonaws/services/schemaregistry/examples/kds/PutRecordGetRecordExample.java | Migrates Kinesis calls to AWS SDK v2 (KinesisClient, builder-based requests). |
| examples/pom.xml | Switches examples module dependency from SDK v1 Kinesis to SDK v2 Kinesis. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Replace com.amazonaws:aws-java-sdk-kinesis with software.amazon.awssdk:kinesis and migrate PutRecordGetRecordExample.java from AmazonKinesis (v1) to KinesisClient (v2) using the builder pattern.
e8fe2d9 to
4b26253
Compare
…mple - Fix describeStream pagination by using exclusiveStartShardId - Remove dead code (ignored shardId() return value) - Wrap KinesisClient in try-with-resources to prevent resource leak
emilie-deltil
approved these changes
Mar 9, 2026
This was referenced Mar 10, 2026
Closed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available: #500
Description of changes:
Migrate the
examplesmodule from AWS SDK v1 Kinesis client to v2:com.amazonaws:aws-java-sdk-kinesisdependency withsoftware.amazon.awssdk:kinesisPutRecordGetRecordExample.javato useKinesisClient(v2) instead ofAmazonKinesis(v1), using the v2 builder pattern for all request/response objectsBy submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.