Find applications using Amazon SDK for Java 1.x clients
Before migrating to the Amazon SDK for Java 2.x, you need to identify which applications in your environment use version 1.x clients. You can query the "userAgent" field in Amazon CloudTrail events to find these applications.
Use CloudTrail Lake to find applications with 1.x clients
Amazon CloudTrail Lake lets you query events recorded by CloudTrail. Follow these steps to create a data lake that identifies SDK versions used by your applications:
-
Create a CloudTrail data lake. Refer to the User guide to create an event data store.
-
After you create the data store, examine the record contents. The record body contains fields that determine the requested action, timing, and location. For details, refer to the User guide for CloudTrail record contents.
-
Run queries against your data. Follow the User Guide to query and save query results.
The userAgent field in each record contains the SDK version that made the request. Use this field to identify applications using version 1.x of the Java SDK.
The following sample query finds all requests made with Java SDK 1.x starting from June 17, 2025, for an EventDatastoreID sample-Data-Store-Id
:
select userIdentity, eventSource, awsRegion, eventName, eventType, eventTime, userAgent, requestParameters, sourceIPAddress from sample-Data-Store-Id where eventTime > '2025-06-17 00:00:00' and userAgent like '%aws-sdk-java/1.%' order by eventTime desc
An example of event content in the query result looks like this:
{ "userIdentity": "{ "type": "IAMUser", "principalId": "AIDAJ45Q7YFFAREXAMPLE", "arn": "arn:aws:iam::123456789012:user/Alice", "accountId": "123456789012", "accessKeyId": "", "userName": "Alice" }", "eventSource": "dynamodb.amazonaws.com", "awsRegion": "us-west-2", "eventName": "ListTables", "eventType": "AwsApiCall", "eventTime": "2025-07-01 02:23:52.000", "userAgent": "aws-sdk-java/1.12.746 Linux/5.10.240 OpenJDK/11.0.25+9-LTS ...", "requestParameters": "", "sourceIPAddress": "12.345.6.78" }
You can use this information to help determine when and where the request was made.
In the example, a DynamoDB ListTables
request was made at 2025-07-01
02:23:52 (UTC)
from the IP Address 12.345.6.78
with the credentials
of the IAM user named Alice. The userAgent field's
value shows that the request was made using the Amazon SDK for Java version 1.12.746
from a Linux system with JDK 11.
For a description of the fields in the Amazon CloudTrail event record, see CloudTrail record contents for management, data, and network activity events .