Many applications depend on a shared file system to exchange state. An EFS file system can be mounted to multiple EC2 instances to share files between the instances. But the EFS file system is a finite resource that can be exhausted. That’s why you need to add monitoring to be alerted if the file system gets a bottleneck. We created a CloudFormation template that you can use to monitor any EFS file system in a minute.
Each EFS file system sends metrics to CloudWatch that we can observe with CloudWatch Alarms. We recommend to create alarms for the following metrics:
If a metric crosses the alarm’s threshold, you will receive an alert in Slack.
- Create the CloudFormation stack with a single click
- Ensure that you selected the AWS region of your file system monitoring target
- Set the EndpointId parameter to the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel.
- Set the FileSystemId parameter to the ID of your EFS file system.
- Review the threshold parameters
- Save by clicking the Create button.