The denial of service attack sought to overwhelm government email systems and prevent the States from being able to use email, said a spokesman.
The "sophisticated and potentially serious cyber-attack" was "resolved in under 48 hours", said a spokesman.
There is no evidence that any personal data has been lost, said the States.
An incident in 2018 had "significant impacts" on the organisation for several weeks, and smaller impacts that continued for months.
Colin Vaudin, chief information officer for the States of Guernsey, said: "Cyber-attacks are, regrettably, now part of the day-to-day security considerations for any organisation, and the ability to prepare, protect and recover from such attacks is crucial."