Making alarm in disk space using cloudwatch

Solution 1:

Amazon has provided exactly what you are looking for:

mon-put-instance-data.pl - Collects system metrics on an Amazon EC2 instance (memory, swap, disk space utilization) and sends them to Amazon CloudWatch.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/mon-scripts.html

Note: Somebody had posted a pointer to this as an answer here earlier, but it looks like the answer was taken down. I wish they could get credit for this answer.

I'll also pull the aws-missing-tools link from cyberx86's comment above into this answer as it could be helpful:

https://github.com/colinbjohnson/aws-missing-tools/blob/master/ec2-write-storage-used/ec2-write-storage-used.sh

Solution 2:

Amazon doesn't have any visibility into the state of your filesystems.

As such, you'll need to write your own script that pushes disk space metrics into a CW custom metric.