Amazon database services and Amazon SDK for Java 2.x - Amazon SDK for Java 2.x
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Amazon database services and Amazon SDK for Java 2.x

Amazon offers several database types: relational, key-value, in-memory, document, and several others. The SDK for Java 2.x support varies depending the nature of the database service in Amazon.

Some database services, for example Amazon DynamoDB service, have web service APIs to manage the Amazon resource (database) as well as web service APIs to interact with the data. In the SDK for Java 2.x these types of services have dedicated service clients, for example DynamoDBClient.

Other database services have web service APIs that interact with the resource, such the Amazon DocumentDB API (for cluster, instance and resource management), but do not have a web service API for working with the data. The SDK for Java 2.x has a corresponding DocDbClient interface for working with the resource. However, you need another Java API, such as MongoDB for Java to work with the data.

Use the examples below to learn how you use the SDK for Java 2.x service clients with the different types of databases.

Amazon DynamoDB examples

Working with the data

Working with the database

SDK service client: DynamoDbClient SDK service client: DynamoDbClient
Example: React/Spring REST application using DynamoDB Examples: CreateTable, ListTables, DeleteTable
Examples: Several DynamoDB examples
SDK service client: DynamoDbEnhancedClient
Example: React/Spring REST application using DynamoDB
Examples: Several DynamoDB examples (names starting with 'Enhanced")

See additional DynamoDB examples in the guided code examples section of this guide.

Amazon RDS examples

Working with the data

Working with the database

Non-SDK API: JDBC, database-specific SQL flavor; your code manages database connections or a connection pool. SDK service client: RdsClient
Example: React/Spring REST application using MySQL Examples: Several RdsClient examples

Amazon Redshift examples

Working with the data

Working with the database

SDK service client: RedshiftDataClient SDK service client: RedshiftClient
Examples: Several RedshiftDataClient examples Examples: Several RedshiftClient examples
Example: React/Spring REST application using RedshiftDataClient

Amazon Aurora Serverless v2 examples

Working with the data

Working with the database

SDK service client: RdsDataClient SDK service client: RdsClient
Example: React/Spring REST application using RdsDataClient Examples: Several RdsClient examples

Amazon DocumentDB examples

Working with the data

Working with the database

Non-SDK API: MongoDB-specific Java library (for example MongoDB for Java); your code manages database connections or a connection pool. SDK service client: DocDbClient
Examples: DocumentDB (Mongo) Developer Guide (select 'Java' tab)