A month after invading Poland together
They did not. Germany invaded Poland and poland capitulated and the government went into exile. Then, the Soviets entered the former Polish territory to prevent it getting into the hands of the Germans.
Nazi Germany and Soviet Russia signed the "Nazi–Soviet Boundary and Friendship Treaty".
Having "friendship" in the name is not an alliance either.