PHP Application with Web Root on Amazon EFS using up too much EFS bandwidth

Solution 1:

There are several ways to gather information for this problem.

For all of these methods, I recommend using a tool that can process and visualize log files. I use Amazon Athena for this which makes loading Amazon logfiles from S3 so easy. Another visualization tool is Amazon QuickSight.

  1. Examine the logfiles for your application. Try to determine traffic that is normal to find out if there is unexpected traffic. You could have good or bad bots trolling your site. Amazon WAF can help block bad traffic.
  2. Enable VPC Flowlogs. Flowlogs will show you all of the network traffic. You can drill down to just your instance and EFS. Athena can then show you who is talking to who and where the bandwidth is being consumed.
  3. Enable CloudTrail. CloudTrail will show you all of the APIs issued to EFS (and a lot more). This may identify something unexpected.
  4. CloudWatch. CloudWatch can display metrics for you so that you can determine the time of day that EFS bandwidth is being consumed. You can also set alarms to notify you via email, SMS, etc. Many more features to help you monitor your infrastructure.

Please update this thread once you figure this out. Your experience and information will help others.