AWS Developer Tools Blog

Announcing RBS support for AWS SDK for Ruby V3

RBS is a language to describe the structure of Ruby programs. We are happy to announce that AWS SDK for Ruby V3 now supports RBS type signatures! RBS support is released in aws-sdk-core version 3.191.0 and in every service gem (such as aws-sdk-s3) that depends on this version of core. RBS signatures are currently code generated from the API models for the API client, errors, resource models, types/structures, and waiters.

Example Usage: Using RBS with RubyMine

RubyMine supports RBS natively when the rbs gem is installed and the version is >= 3.4. This allows you to get type hints for incompatible types in your IDE when using AWS SDK for Ruby V3.

Incompatible types for Aws::S3::Client.region. Required String, Passed Integer
Incompatible types are shown when creating a new Client.

List Objects V2 requires a hash with bucket as a String, etc
Hovering over Client operations displays the expected types that the API defines.

For more information about RBS support in RubyMine, please visit their documentation.

A Special Thank You

This feature was developed by Yuki Kurihara (@ksss on GitHub) as a community contribution. We want to thank him for his work.

Our team is always willing to accept feature requests and community contributions that make AWS SDK for Ruby more useful and idiomatic. If you encounter any issues with the RBS signature or have any feature requests, please create an issue on GitHub!

About the author:

Matt Muller

Matt Muller

Matt is a software engineer and maintainer of AWS SDK for Ruby. You can find him on GitHub as @mullermp.