Which of the following AWS CLI commands would you use for adding one or more incoming traffic rules to a security group?
authorize-security-group-egress
authorize-security-group-ingress
Grant-EC2SecurityGroupOutgress
Get-EC2SecurityGroup
Explanations:
authorize-security-group-egressis used to add outbound (egress) rules, not incoming (ingress) rules.
authorize-security-group-ingressis used to add one or more inbound (ingress) rules to a security group.
Grant-EC2SecurityGroupOutgressis not a valid AWS CLI command; the correct term is “egress,” and no such command exists.
Get-EC2SecurityGroupis not a valid AWS CLI command; it does not apply to security group rule modifications.