I have a rhel linux template vm on amazon ec2 which will need to format and mount swap on /dev/sdb which is a amazon ssd disk
This will need to be a script as if this vm is ever restarted, it may move to another amazon host and ssd so it will need to repeat process of formating /dev/sdb and mounting it as swap.
So steps without a script would follow...
then make the fstab entry, although it's probably unnecessary
/dev/sdb1 swap swap defaults 0 0
I am attaching one possible script I found on the internet as a start point.