Instance launch failed. Adding EFS security group to mount targets failed. The maximum number of security groups per interface has been reached.

0

I'm trying to launch a new ec2 instance that automatically mounts an existing EFS file system. I'm using the following settings:

Amazon Linux 2 Kernel 5.10 AMI 2.0.20220719.0 x86_64 HVM gp2
64-bit (x86) ami-0c956e207f9d113d5
c5a.16xlarge
VPC (default)
Subnet: The subnet of the default VPC in eu-central-1a zone.
Create security group
File systems:
EFS
An existing file system in eu-central-1a zone

I have done the same operation before, but now i get an error.

Instance launch failed
The maximum number of security groups per interface has been reached.

Launch log
Initializing requests Succeeded
Creating security groups Succeeded
Creating security group rules Succeeded
Creating EFS security groups Succeeded
Adding ingress rules to EFS security groups Succeeded
Adding egress rules to EFS security groups Succeeded
Adding EFS security group to mount targets Failed

What should I do to fix this?

2 Answers
0

If you look at Security Groups section in this page - https://docs.aws.amazon.com/vpc/latest/userguide/amazon-vpc-limits.html you will see that the maximum security groups per network interface by default is 5. This is however a soft limit and you can apply for it to be increased, as mentioned here - https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html

profile pictureAWS
EXPERT
answered 2 years ago
0

You can check the event for the API call "ModifyMountTargetSecurityGroups" in your AWS CLoudTrail event history and that will tell you the reason for failure.

https://docs.aws.amazon.com/efs/latest/ug/API_ModifyMountTargetSecurityGroups.html

AWS
RRP_AWS
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.

Guidelines for Answering Questions