Reputation: 5135
Here I have an AWS instance that has been specified with two security group default
① and my first group
②.
Now I would like to make this instance ssh available. Both the following ways work:
ssh-available
ssh-available
.Are they same?
When specifying an security group to an instance, is its eni specified a security group under the hood?
Upvotes: 9
Views: 6957
Reputation: 35238
To add to Johns great comment, this makes sense when you think that Security Groups are not just bound to EC2 instances, in fact any resource with an ENI can have a security group attached with examples such as:
By having a single implementation of security group -> ENI, I would imagine it makes it easier for AWS to implement networking security for new VPC based resources over time.
Upvotes: 8
Reputation: 269826
Yes. Security Groups are attached to Elastic Network Interfaces (ENIs). That's why the console shows it under the Networking tab.
This design allows different security settings if there are multiple ENIs. For example, one ENI could be used for external traffic and a different ENI could be used for internal traffic.
Most Amazon EC2 instances only have one ENI, so it is easier to think of the Security Group as being associated with the instance.
Upvotes: 18