def build_global_index_updates_array(current_global_indexes)
      indexes_to_update = []
      return indexes_to_update if current_global_indexes.empty?
      current_global_indexes.each do |current_index|
        @global_secondary_indexes.each do |target_index|
          # Find the same named index
          next unless target_index[:index_name] == current_index[:index_name]
          # Skip unless a different ProvisionedThroughput is specified
          break unless (target_index[:provisioned_throughput][:read_capacity_units] !=
                        current_index.provisioned_throughput.read_capacity_units) ||
                       (target_index[:provisioned_throughput][:write_capacity_units] !=
                        current_index.provisioned_throughput.write_capacity_units)
          indexes_to_update << { index_name: target_index[:index_name],
                                 provisioned_throughput: target_index[:provisioned_throughput] }
        end
      end
      puts indexes_to_update
      indexes_to_update
    end
def build_global_index_updates_array(current_global_indexes)
      indexes_to_update = []
      return indexes_to_update if current_global_indexes.empty?
      current_global_indexes.each do |current_index|
        @global_secondary_indexes.each do |target_index|
          # Find the same named index
          next unless target_index[:index_name] == current_index[:index_name]
          # Skip unless a different ProvisionedThroughput is specified
          break unless (target_index[:provisioned_throughput][:read_capacity_units] !=
                        current_index.provisioned_throughput.read_capacity_units) ||
                       (target_index[:provisioned_throughput][:write_capacity_units] !=
                        current_index.provisioned_throughput.write_capacity_units)
          indexes_to_update << { index_name: target_index[:index_name],
                                 provisioned_throughput: target_index[:provisioned_throughput] }
        end
      end
      puts indexes_to_update
      indexes_to_update
    end
Looks through the list current of Global Secondary Indexes and builds an array if the Provisioned Throughput
 in the intended Indexes are higher than the current Indexes.