I want to set up an IP address for a security group with CLI. But for some reason AWS throws an error. And the value is just absolutely correct because I'm setting the same value as set there at the time of command execution. What is wrong? Why is this error?
$ aws ec2 authorize-security-group-ingress --protocol tcp --port 22 --cidr 'xx.xx.xxx.xx/32' --group-id sg-xxxxxxxx
An error occurred (InvalidParameterValue) when calling the AuthorizeSecurityGroupIngress operation: CIDR block xx.xx.xxx.xx\32 is malformed
Your command worked perfectly well for me (substituting an IP address and a security group).
You might want to try it without the single-quotes.
Also, the error with a backslash (CIDR block xx.xx.xxx.xx\32 is malformed
) is a little concerning, as if it has converted your input. I receive exactly the same error if I use a backslash (\
) instead of a forward slash (/
).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With