Restrict number of EBS volumes created by an user.

0

is it possible to restrict the number of EBS volumes created by a user? Basically, I want to restrict the number of EBS volumes/EBS volume size created by a user using ec2/ EKS. so inactive EBS volumes can be cleanup by the user.

Kalai
已提問 8 個月前檢視次數 193 次
3 個答案
0

Hello.

The EC2 condition key is "ec2:volumeSize".
I believe it is possible to limit the size of the volume by using this.
https://docs.aws.amazon.com/service-authorization/latest/reference/list_amazonec2.html#amazonec2-policy-keys

Perhaps the answer you are seeking is the one listed on stackoverflow.
https://stackoverflow.com/questions/49104681/how-to-limit-ec2-ebs-volume-size-for-ec2runinstances-in-iam-policy

However, there was no conditional key limiting the number of volumes.

profile picture
專家
已回答 8 個月前
  • Hello,

    I'm interested in setting restrictions on the cumulative size of EBS volumes generated by a specific user. Essentially, I aim to enforce a quota for this user, ensuring they do not exceed a total of X EBS volumes or Y cumulative size of EBS volumes. I believe the provided link talks about limit on 1 EBS volume can be created.

0

Hello,

I'm interested in setting restrictions on the cumulative size of EBS volumes generated by a specific user. Essentially, I aim to enforce a quota for this user, ensuring they do not exceed a total of X EBS volumes or Y cumulative size of EBS volumes. I believe the provided link talks about limit on 1 EBS volume can be created.

Kalai
已回答 8 個月前
0

As far as I know to enforce quotas on the cumulative size or total count of EBS volumes, you would typically need to implement a custom solution. Heres several possible approaches to achieve this:

  • Implement a monitoring system that tracks the EBS volumes created by each user and calculates the cumulative size.
  • Develop a custom system or script that periodically checks the usage against predefined quotas. This system can compare the cumulative size and total count of EBS volumes against the user's quota.
  • Set up an alert and actions for when a user exceeds their quota. You can trigger actions like notifying the user, suspending their IAM permissions for EBS volume creation, or initiating cleanup processes.
  • Implement automated policies or processes to remove or resize EBS volumes when users exceed their quotas. Ensure that you have a well-defined policy for which volumes to remove or resize, and consider backup and data retention requirements.
  • Adjust the user's IAM permissions to limit their ability to create or modify EBS volumes once they reach their quota.
profile pictureAWS
JC
已回答 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南