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
gefragt vor 5 Monaten287 Aufrufe
1 Antwort
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
EXPERTE
beantwortet vor 5 Monaten
profile pictureAWS
EXPERTE
iBehr
überprüft vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen