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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ