CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-software-amazon-awssdk--bom

AWS SDK for Java v2 Bill of Materials providing centralized dependency management for 450+ AWS service modules and SDK components

Overview
Eval results
Files

http-clients.mddocs/

HTTP Clients

Pluggable HTTP client implementations for making requests to AWS services. The AWS SDK provides multiple HTTP client implementations allowing you to choose the best option based on your application's requirements and runtime environment.

Core Imports

<!-- Import BOM for version management -->
<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>software.amazon.awssdk</groupId>
            <artifactId>bom</artifactId>
            <version>2.33.4</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>
</dependencyManagement>

Capabilities

Netty NIO Client

Asynchronous HTTP client implementation based on Netty NIO for high-performance non-blocking operations.

/**
 * Netty-based NIO HTTP client for asynchronous operations
 * Best for: High-throughput applications, async/reactive programming
 * Features: Non-blocking I/O, connection pooling, HTTP/2 support
 */
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>netty-nio-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

Usage Example:

<dependencies>
    <!-- Service client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>s3</artifactId>
    </dependency>
    
    <!-- Netty HTTP client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>netty-nio-client</artifactId>
    </dependency>
</dependencies>

Apache HTTP Client

Traditional Apache HTTP client implementation for blocking operations with extensive configuration options.

/**
 * Apache HTTP client implementation for synchronous operations
 * Best for: Traditional blocking applications, extensive HTTP customization
 * Features: Mature ecosystem, comprehensive configuration, proxy support
 */
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>apache-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

Usage Example:

<dependencies>
    <!-- Service client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>dynamodb</artifactId>
    </dependency>
    
    <!-- Apache HTTP client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>apache-client</artifactId>
    </dependency>
</dependencies>

Apache HTTP 5 Client (Preview)

Next-generation Apache HTTP client implementation with modern features and improved performance.

/**
 * Apache HTTP 5 client implementation (Preview version)
 * Best for: Modern applications wanting latest Apache HTTP features
 * Features: HTTP/2, improved performance, modern API design
 * Note: Preview version with evolving API
 */
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>apache5-client</artifactId>
    <version>${awsjavasdk.version}-PREVIEW</version>
</dependency>

URL Connection Client

Java's built-in HTTP client implementation with minimal dependencies and JVM integration.

/**
 * Java URL Connection HTTP client implementation
 * Best for: Minimal dependencies, simple applications, restricted environments
 * Features: No external dependencies, JVM built-in, lightweight
 */
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>url-connection-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

Usage Example:

<dependencies>
    <!-- Service client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>lambda</artifactId>
    </dependency>
    
    <!-- URL Connection HTTP client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>url-connection-client</artifactId>
    </dependency>
</dependencies>

AWS Common Runtime (CRT) Client

High-performance HTTP client implementation based on AWS Common Runtime for optimal performance.

/**
 * AWS Common Runtime HTTP client implementation
 * Best for: Maximum performance, native optimizations, latest AWS features
 * Features: Native performance, advanced AWS integrations, optimal throughput
 */
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>aws-crt-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

Usage Example:

<dependencies>
    <!-- Service client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>s3</artifactId>
    </dependency>
    
    <!-- AWS CRT HTTP client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>aws-crt-client</artifactId>
    </dependency>
</dependencies>

HTTP Client SPI

Service Provider Interface for implementing custom HTTP client implementations.

/**
 * HTTP Client SPI - Service provider interface for custom HTTP implementations
 * Best for: Custom HTTP client implementations, SDK extensions
 * Features: Pluggable HTTP client architecture, extensibility interface
 */
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>http-client-spi</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

HTTP Client Selection Guide

Performance Characteristics

ClientTypePerformanceUse Case
netty-nio-clientAsyncHighHigh-throughput, non-blocking
aws-crt-clientSync/AsyncHighestMaximum performance
apache-clientSyncGoodTraditional applications
apache5-clientSyncGoodModern Apache features
url-connection-clientSyncBasicMinimal dependencies

Selection Criteria

Choose Netty NIO Client when:

  • Building reactive or asynchronous applications
  • Need high throughput and concurrent requests
  • Using frameworks like Spring WebFlux or Vert.x
  • Want non-blocking I/O operations

Choose AWS CRT Client when:

  • Performance is critical
  • Need latest AWS service optimizations
  • Building high-scale applications
  • Want native performance characteristics

Choose Apache HTTP Client when:

  • Building traditional blocking applications
  • Need extensive HTTP configuration options
  • Require proxy support or custom SSL configurations
  • Have existing Apache HttpClient expertise

Choose URL Connection Client when:

  • Want minimal dependencies
  • Building simple applications
  • Working in restricted environments
  • Don't need advanced HTTP features

Usage Examples

Multi-client setup for different services:

<dependencies>
    <!-- S3 with high-performance CRT client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>s3</artifactId>
    </dependency>
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>aws-crt-client</artifactId>
    </dependency>
    
    <!-- DynamoDB with async Netty client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>dynamodb</artifactId>
    </dependency>
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>netty-nio-client</artifactId>
    </dependency>
    
    <!-- Lambda with minimal URL client -->
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>lambda</artifactId>
    </dependency>
    <dependency>
        <groupId>software.amazon.awssdk</groupId>
        <artifactId>url-connection-client</artifactId>
    </dependency>
</dependencies>

Default client selection:

If no HTTP client is explicitly added as a dependency, the SDK will automatically select a default client based on the classpath. The selection order is:

  1. netty-nio-client (if available)
  2. apache-client (if available)
  3. url-connection-client (built-in fallback)

Types

<!-- HTTP client dependency coordinates with version management -->
<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>netty-nio-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>apache-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>apache5-client</artifactId>
    <version>${awsjavasdk.version}-PREVIEW</version>
</dependency>

<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>url-connection-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>aws-crt-client</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

<dependency>
    <groupId>software.amazon.awssdk</groupId>
    <artifactId>http-client-spi</artifactId>
    <version>${awsjavasdk.version}</version>
</dependency>

Install with Tessl CLI

npx tessl i tessl/maven-software-amazon-awssdk--bom

docs

authentication.md

core-infrastructure.md

enhanced-libraries.md

http-clients.md

index.md

service-clients.md

tile.json