AWS SDK for Ruby
Developer Guide

Getting Information about All Amazon DynamoDB Tables

The following example lists the names and number of items in each table in the us-west-2 region.

require 'aws-sdk-dynamodb' # v2: require 'aws-sdk' dynamoDB = Aws::DynamoDB::Resource.new(region: 'us-west-2') dynamoDB.tables.each do |t| puts "Name: #{t.name}" puts "#Items: #{t.item_count}" end