Up close it will use Melee and if you're stood away from it, it'll attack with Ranged. Despite having no specific weakness, Magic is quite effective, although both Melee and Ranged are still more then capable of killing it if preferred.
Occasionally the scarab will spawn Locust riders and Scarab mages to aid it and you can either kill these to reduce the damage you take or ignore them and focus on killing the scarab as quickly as possible.
The scarab and its minions can poison you, so bringing a Super antipoison potion is recommended.
After completing Contact! the Giant scarab can be fought as a Class D boss in the Dominion Tower.