1

I have created a security group in AWS. I have added the ingress rule using the below command

aws ec2 authorize-security-group-ingress --group-id sg-07xxxx4d --ip-protocol tcp --from-port 22 --to-port 22 --cidr-ip 0.0.0.0/0

But instead of IP, if i want to give the source as another existing security group, how can i do that?

1

Ok I got the answer after exploring few things and looking at the error more attentively. Here is the way:

aws ec2 authorize-security-group-ingress --group-id sg-07xxxx24d  --protocol tcp --port 22 --source-group sg-d7dyyyy5

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.