Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can AWS security groups on one AWS account reference security groups in another?

For example, I have a main company AWS account one with security group-xxxxx. Now I have my personal aws with security group-yyyyy. The accounts are not related at all. Can I add accept group-yyyyy into the group-xxxxx thereby allowing my personal instances to access the companies instances?

like image 979
David Witherspoon Avatar asked Sep 17 '12 19:09

David Witherspoon


People also ask

Can you add a security group to another security group?

You can add an existing Security group to another Security group (also known as nested groups), creating a member group (subgroup) and a parent group.

Can security groups be nested AWS?

AWS Security Group can't be nested; they can contain only users, not other groups. AWS Security Group has no default group that automatically includes all users in the AWS account. If you want to have a group like that, you need to create it and assign each new user to it.

Can a security group be applied across multiple instances?

Single security groups can be applied to multiple instances, in the same way that you can apply a traditional security policy to multiple firewalls.

Can I use same security group in different VPC?

When you create a VPC, it comes with a default security group. You can create additional security groups for each VPC. You can associate a security group only with resources in the VPC for which it is created. For each security group, you add rules that control the traffic based on protocols and port numbers.


2 Answers

You can use the web UI to add

other-aws-account-id/account-security-group-id

ie

951413000000/sg-deadbeef as the source

like image 50
crizCraig Avatar answered Sep 20 '22 15:09

crizCraig


For people looking for a solution for this question now, it is possible for security groups to be referenced from cross accounts if their vpc is peered. ! Its a new feature from aws ! Cheers

Link to article

like image 27
Joel Nishanth Ponukumatla Avatar answered Sep 19 '22 15:09

Joel Nishanth Ponukumatla