Toss cucumber slices, onion slices, and salt together in a bowl; let stand 2 hours. Drain as much moisture from the mixture as possible.
Stir sugar and vinegar together in a saucepan over medium-low heat; cook and stir until the sugar dissolves completely, 5 to 10 minutes. Set aside to cool completely.
Pour the cooled vinegar mixture over the cucumbers and onion; toss to coat. Transfer to large freezer bags.