Class AWS::DynamoDB::Binary
In: lib/aws/dynamo_db/binary.rb
Parent: String

Use this class to wrap strings that you want Amazon DynamoDB to store as a binary attribute. This can reduce the size of larger attributes to save on storage costs.

    table = AWS::DynamoDB.new.tables['data-table']
    table.hash_key = { 'id' => :string }
    table.range_key = { 'position' => :number }

    # put an item with a binary data attribute
    table.items.create(
      'id' => 'abc',
      'position' => 5,
      'data' => AWS::DynamoDB::Binary.new('abc')
    )

[Validate]