How to add description to the aws security group ingress rule?

0

aws ec2 authorize-security-group-ingress
--group-id $security_group_id
--protocol tcp
--port 3306
--cidr $ip_to_add/32
--description $description

To see help text, you can run:

aws help aws <command> help aws <command> <subcommand> help

usage: aws [options] <command> <subcommand> [<subcommand> ...] [parameters]

Unknown options: --description, CICD_20231215085741 Security group configuration completed.

DD-Boom
已提問 5 個月前檢視次數 287 次
1 個回答
1

Hello.

Looking at the AWS CLI documentation, there is no "--description" option.
https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ec2/authorize-security-group-ingress.html

So you need to use a command like the following.

aws ec2 authorize-security-group-ingress --group-id sg-1111111111 --ip-permissions FromPort=3306,IpProtocol=tcp,IpRanges="[{"CidrIp"="1.1.1.1/32","Description"="test"}]",ToPort=3306
profile picture
專家
已回答 5 個月前
profile pictureAWS
專家
iBehr
已審閱 5 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南