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
gefragt vor 8 Monaten193 Aufrufe
3 Antworten
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
EXPERTE
beantwortet vor 8 Monaten
  • 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
beantwortet vor 8 Monaten
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
beantwortet vor 8 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen