EC2-AUTHORIZE(1)
π ec2-authorize β the manual page but make it a group chat π
okay bestie, sit down, hydrate, because today we're learning ec2-authorize, the ec2-authorize command from the User Commands manual. it grants permissions to a specified group. that's it, that's the vibe. it's giving "let them in, but only through the door i choose" π
β¨ NAME β¨
ec2-authorize β Grant permissions to a specified group π«Ά
β¨ SYNOPSIS β¨
ec2auth ([ec2-authorize])
ec2auth [GENERAL OPTIONS] GROUP [SPECIFIC OPTIONS]
β¨ GENERAL NOTES β¨
bestie listen. any command option or parameter can be handed a value of - and that means "pls read the values for this option from stdin" π. yes literally any of them. iconic behavior honestly.
β¨ DESCRIPTION β¨
Grant selected permissions to a specified group. that's the whole mission. β¨
the GROUP parameter is the name or the ID of the group you're granting this permission to.
β οΈ important heads up: VPC security groups for non-default VPCs must be specified by ID. no name, no nickname, no "you know the one" β the ID. periodt. π
β¨ GENERAL OPTIONS β¨
these are the universal ones, the base layer, the everyday carry:
-O,--aws-access-key KEYβ your AWS Access Key ID. defaults to whatever theAWS_ACCESS_KEYenvironment variable is (if it's set). π-W,--aws-secret-key KEYβ your AWS Secret Access Key. defaults to the value of theAWS_SECRET_KEYenvironment variable (if set). π€«-T,--security-token TOKENβ AWS delegation token. defaults to the value of theAWS_DELEGATION_TOKENenvironment variable (if set). π«-K,--private-key KEYβ [DEPRECATED] specifyKEYas the private key to use. defaults to the value of theEC2_PRIVATE_KEYenvironment variable (if set), and overrides the default. it's deprecated bestie, it's giving "we don't do that anymore" π-C,--cert CERTβ [DEPRECATED] specifyCERTas the X509 certificate to use. defaults to the value of theEC2_CERTenvironment variable (if set), and overrides the default. also deprecated, also a relic, we respect the history tho π-U,--url URLβ specifyURLas the web service URL to use. defaults tohttps://ec2.amazonaws.com(that's us-east-1) or to the value of theEC2_URLenvironment variable (if set), and it overrides the default. π--region REGIONβ specifyREGIONas the web service region to use. this option overrides the URL you gave with-U URLand overrides theEC2_URLenvironment variable. it defaults to the region specified by theEC2_URLenvironment variable, orus-east-1if that environment variable isn't set. so like, it's the boss of the URL situation, lowkey. π-D,--auth-dry-runβ check whether you can perform the requested action instead of actually doing it. a lil rehearsal, a dress rehearsal if you will. π-v,--verboseβ verbose output. give me ALL the details. π£οΈ-?,--helpβ display this help. the classic. π-H,--headersβ display column headers. π--debugβ display additional debugging information. π--show-empty-fieldsβ indicate empty fields. π³οΈ--hide-tagsβ do not display tags for tagged resources. π·οΈ--connection-timeout TIMEOUTβ specify a connection timeoutTIMEOUT, in seconds. β±οΈ--request-timeout TIMEOUTβ specify a request timeoutTIMEOUT, in seconds. β³
β¨ SPECIFIC OPTIONS β¨
now the fun part, the actual rule-making. this is where you decide who gets in and how πͺβ¨
--egressβ specifies an egress rule. otherwise, ingress is assumed. so like, no flag = traffic coming in, flag = traffic going out. π-P,--protocol PROTOCOLβ may be either a protocol name or a protocol number. note that non-VPC security groups only allowtcp,udpandicmprules. for non-VPC groups the protocol may be left blank, in which case it defaults totcpif a source subnet is specified, totcpandudpif a source group and port range are specified, and totcp,udpandicmpif only a source group is specified. for VPC groups the protocolallmust be explicitly specified. so yes, VPC needs you to sayallout loud, no mind reading π§ β¨-p,--port-range PORT-RANGEβ range of ports to open. if thetcporudpprotocol is specified (or implied by default), then the range of ports to grant access to may optionally be specified as a single integer, or as a range (min-max). specifying-1defaults to all ports. all of them. every single one. π³-t,--icmp-type-code TYPE:CODEβ icmp type and code. if theicmpprotocol is specified, then icmp type and code may optionally be specified astype:code, where both type and code are integers and compliant with RFC792. type or code (or both) may be specified as-1, which is a wildcard covering all types or codes. π-o,--source-or-dest-group SOURCE-OR-DEST-GROUP[--source-or-dest-group...]β source or destination security group to be authorized, specified as an EC2 security group name, e.g.default. this may be specified more than once to allow network traffic from multiple security groups. stack 'em up bestie π«-u,--source-or-dest-group-user SOURCE-OR-DEST-GROUP-USER[--source-or-dest-group-user...]β the owner of the security group specified using-o. if specified only once, the same user will be used for all specified groups. however, if specified once per-o, each user is mapped to a group in order. anything else is invalid. π« this option is invalid for VPC security groups β VPC source groups must be owned by the authorizing user. no exceptions, no wiggle room π-s,--cidr CIDRβ the network source from which traffic is to be authorized in the case of an ingress request, or to which traffic is to be authorized in the case of an egress request. specified as a CIDR subnet range, e.g.205.192.8.45/24. this may be specified more than once to allow traffic from multiple subnets. π if no subnet and no group are specified, this defaults to the wildcard CIDR0.0.0.0/0. (yes. everyone. the whole internet. be careful π)--source-subnetβ like--cidr, but for ingress requests only. for backward compatibility. π΅--dest-subnetβ like--cidr, but for egress requests only. for backward compatibility. π΄
β¨ SEE ALSO β¨
go read more, bestie, the docs are right there:
http://docs.amazonwebservices.com/AWSEC2/2014-05-01/CommandLineReferencehttp://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference
and that's the whole page, you ate that fr fr π
β¨ this was the EC2 API command line tools page, version 1.6.14.1, api=2014-05-01 β shoutout to the source and the version for making this whole thing possible π«Ά mwah, go authorize something responsibly, ily bye πππ¦
π¦ where this page comes from
- ubuntu jammy: ec2-api-tools 1.6.14.1-0ubuntu1
- ubuntu noble: ec2-api-tools 1.6.14.1-0ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms