Skip to content

EFS metric for AccessPoints count

0

As I am using EFS CSI Driver for Kubernetes (https://github.com/kubernetes-sigs/aws-efs-csi-driver/blob/master/docs/README.md) this leads quite often to the situation where multiple EFS Access Points are being generated (https://docs.aws.amazon.com/efs/latest/ug/efs-access-points.html). This comes with a hard limit of at most 1000 APs per EFS instance and in case of massive processing using the aforementioned driver it can quickly hit the limit. Is it somehow possible to get a metric for that AccessPoint count per EFS instance to monitor this properly? My setup would be revamped to eventually use a limited number of AccessPoints (which in general should be a must in case of parallel processing with EFS) but would be very beneficial to have this under control for as long as it is not yet in place.

asked 2 years ago591 views
3 Answers
0

Hello,

I understand that you are exposed to hit hard limit of at most 1000 APs per EFS instance in case of massive processing and your question drives to get a metric for that AccessPoint count per EFS.

Have you ever thought about calling API DescribeAccessPoints ? By calling this API, you can count the number of AP provisioned. See this example below where I am using cloudshell to call API and count the number of AccessPoints (Names).

[cloudshell-user@ip-xx-xx-xx-xx ~]$ aws efs describe-access-points --query 'AccessPoints[*].Name' [ "RestrictedFinance" ]

Let me know if it brings insights to your solution.

AWS
answered 2 years ago
0

The Amazon EFS service does not currently provide a specific metric to monitor the number of EFS Access Points created for a file system. However, you can use the following approach to monitor this - Use the AWS CLI or AWS SDK to list the EFS Access Points for a specific file system:

aws efs describe-access-points --file-system-id <file-system-id>

This will return a list of all the Access Points associated with the specified EFS file system. You can then track the number of Access Points and set up alarms or notifications if the count approaches a certain limit per file system.

Alternatively, you can use Amazon CloudWatch to create a custom metric that tracks the number of EFS Access Points. You can then set up alarms and notifications based on this custom metric. To create a custom CloudWatch metric, you can use the PutMetricData API or the AWS CLI. Here's an example using the AWS CLI:

aws cloudwatch put-metric-data --namespace "EFS" --metric-name "AccessPointCount" --value <access-point-count> --dimensions "FileSystemId=<file-system-id>"

You can then create a CloudWatch alarm to monitor the "AccessPointCount" metric and receive notifications when the count approaches the limit.

AWS
EXPERT
answered 2 years ago
0

Thank you for information provided, setup with a scheduled Lambda execution that provides metric data is working just fine! Still, it would be great if it is provided as an out-of-the-box metric to avoid additional implementation efforts. Also, fetching the Access Points count is limited by a certain throttling rate on EFS API, so querying it too often for a custom metric might lead to unexpected issues.

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.