For custom metrics for memory, swap, and disk usage, you can make use of the AWS supplied script published on http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html. This script will let you push the data for custom dimensions to CloudWatch, and then you create the alarm on those custom metrics. For Amazon Linux, you need to perform the following steps. For your platform, refer to the link shared. AWS provides these scripts as a sample and there is no support provided if there are any issues with the script.
#sudo yum install perl-Switch perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https -y
#curl http://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.1.zip -O
#unzip CloudWatchMonitoringScripts-1.2.1.zip
#cd aws-scripts-mon
To test the execution, you run the following command:
# ./mon-put-instance-data...