My code:
def query_consulta_token(holder_id) dynamodb = Aws::DynamoDB::Client.new
table_name = "pix_owner_confirmation_token"
holder_id = holder_id
params = {
table_name: table_name,
key: {
holder_id: holder_id,
},
}
begin
result = dynamodb.get_item(params)
puts "%s - %s",
result.item["holder_id"],
result.item["address"],
result.item["token"]
rescue Aws::DynamoDB::Errors::ServiceError => error
puts "Unable to read item:"
puts "#{error.message}"
binding.pry
end
end
My result: Unable to read item: The provided key element does not match the schema