By using AWS re:Post, you agree to the Terms of Use
/Unable to create Inbound rule/

Unable to create Inbound rule


I'm using powershell to create inbound IP rules for an EC2 Instance sec group. I'm running the following code. $IpRange = New-Object -TypeName Amazon.EC2.Model.IpRange $IpRange.CidrIp = "<IPAddr>/32" $IpRange.Description = "Sean" $IpPermission = New-Object Amazon.EC2.Model.IpPermission $IpPermission.IpProtocol = "tcp" $IpPermission.ToPort = 3389 $IpPermission.FromPort = 3389 $IpPermission.Ipv4Ranges = $IpRange Grant-EC2SecurityGroupIngress -GroupId sg-00xxxx -IpPermission $IpPermission

It seems to work just fine at the cmdline, but nothing gets pushed to AWS. Is there something else I need to do?

1 Answers


Use the below link for guidance to setup your security group using powershell[1]

When viewing the security group please make sure you are in the correct region, consider using DescribeSecurityGroups API call to view your security group if it was created succesfullly[1]

secondly you can use cloudtrail to check the api call when you create a security group[2]

And if you are using Powershell you need to have AWS powershell tools installed[3]

you can also try using Systems Manager Run Command AWS-RunPowerShellScript document[4]

answered 12 days 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