class AWS::DynamoDB::Item

def exists?(options = {})

Returns:
  • (Boolean) - True if the item exists.
def exists?(options = {})
  client_opts = item_key_options(self, options)
  client_opts[:attributes_to_get] = [table.hash_key.name]
  resp = client.get_item(client_opts)
  resp.data.key?("Item")
end