aws AWS Developer Tools Blog ·

AWS Smithy Java client framework reaches general availability

blogawsgaengineer
announcement

AWS has announced the general availability of its Smithy Java client framework. This framework enables developers to build type-safe, protocol-agnostic Java clients directly from Smithy models, automating serialization and protocol handling. It is built on Java 21's virtual threads, offering a blocking-style interface for easier development and debugging without sacrificing performance. The framework aims to reduce boilerplate code, allowing developers to focus on core features by generating client code from a single source of truth.

  • Smithy Java client code generation is now GA
  • Model-driven development for service contracts
  • Protocol flexibility with built-in support
  • Dynamic client for runtime model loading
  • Code generation independent of services for data and logic layers
Enhancements (5)
  • Model-driven development for service contracts

    Smithy provides a model-driven approach to defining services and generating code, using declarative formats to capture API structure, constraints, and protocol bindings. This ensures clients, services, and documentation remain aligned with API evolution from a single source of truth.

  • Protocol flexibility with built-in support

    Generated Smithy Java clients are protocol-agnostic and include built-in support for HTTP transport, various AWS protocols (AWS JSON 1.0/1.1, restJson1, restXml, Query), and Smithy RPCv2 CBOR. Protocols can be swapped at runtime without rebuilding the client.

  • Dynamic client for runtime model loading

    A dynamic client is available that loads Smithy models at runtime, allowing interaction with any service API without a code generation step. This is useful for tools, aggregators, or systems needing to interact with unknown services at build time with a small deployment footprint.

  • Code generation independent of services for data and logic layers

    Smithy Java can generate type-safe Java classes from Smithy shapes without service context. This allows for code reuse and consistency across projects sharing common types, extending the model-first approach beyond service calls.

  • Built on Java 21 virtual threads for blocking-style interface

    Smithy Java is built around Java 21's virtual threads, offering a blocking-style interface that is easy to read, write, and debug. This approach avoids complex async APIs, allowing developers to focus on business logic while the JVM handles task scheduling and synchronization.

Notes (1)
  • Smithy Java client code generation is now GA

    The Smithy Java client code generation is now generally available, meaning its public APIs are stable and committed to backward compatibility for production use. Developers can use it to build type-safe, protocol-agnostic Java clients directly from Smithy models, automating serialization, protocol handling, and request/response lifecycles.

Read the original announcement →

https://aws.amazon.com/blogs/developer/smithy-java-client-framework-is-now-generally-available/

Related releases