Most of the cloud service provider disable swap on their systems to better isolate resources at the server level. There is a way around this, you can create your own swap file and configure the system to use the file. This has a bit more overhead than a swap partition so use it wisely.
You can set swappiness while running: sysctl vm.swappiness=10
To retain the settings when rebooting: vi /etc/sysctl.conf and add or edit; vm.swappiness = 10
To query for the current swappiness setting: cat /proc/sys/vm/swappiness
The setting range is 0 to 100. The higher the number the sooner swap is used preserving RAM. A swappiness setting of zero means that the disk will be avoided unless absolutely necessary (you run out of memory), while a swappiness setting of 100 means that programs will be swapped to disk almost instantly.