@@ -15,21 +15,21 @@ from aec.main import build_parser
1515cog.out(f"```\n{build_parser()._subparsers._actions[1].choices['ec2'].format_help()}```")
1616]]] -->
1717```
18- usage: aec ec2 [-h]
19- {create-key-pair,describe,launch,logs,modify,start,stop,sec-groups,subnets,rename,tag,tags,status,templates,terminate,user-data} ...
18+ usage: aec ec2 [-h] {create-key-pair,describe,launch,logs,modify,start,stop,restart,sec-groups,subnets,rename,tag,tags,status,templates,terminate,user-data} ...
2019
2120optional arguments:
2221 -h, --help show this help message and exit
2322
2423subcommands:
25- {create-key-pair,describe,launch,logs,modify,start,stop,sec-groups,subnets,rename,tag,tags,status,templates,terminate,user-data}
24+ {create-key-pair,describe,launch,logs,modify,start,stop,restart, sec-groups,subnets,rename,tag,tags,status,templates,terminate,user-data}
2625 create-key-pair Create a key pair.
2726 describe List EC2 instances in the region.
2827 launch Launch a tagged EC2 instance with an EBS volume.
2928 logs Show the system logs.
3029 modify Change an instance's type.
3130 start Start EC2 instance.
3231 stop Stop EC2 instance.
32+ restart Restart EC2 instance, optionally changing the instance type.
3333 sec-groups Describe security groups in the region, optionally filtered by VPC ID.
3434 subnets Describe subnets.
3535 rename Rename EC2 instance(s).
@@ -72,6 +72,11 @@ Start a stopped instance, and wait for the SSM agent to come online (at which po
7272aec ec2 start "lady gaga" -w
7373```
7474
75+ Restart an instance and change the instance type:
76+ ```
77+ aec ec2 restart "lady gaga" -t m5.large
78+ ```
79+
7580List all instances in the region:
7681
7782<!-- [[[cog
@@ -82,8 +87,8 @@ aec ec2 describe
8287
8388 InstanceId State Name Type DnsName LaunchTime ImageId
8489 ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
85- i-d11c784672f583196 running alice t3.small ec2-54-214-8-190 .compute-1.amazonaws.com 2025-04-01 09:46:15 +00:00 ami-03cf127a
86- i-919d8e2adf1445b8d running sam t3.small ec2-54-214-106-199 .compute-1.amazonaws.com 2025-04-01 09:46:16 +00:00 ami-03cf127a
90+ i-a6c907a7659c657ec running alice t3.small ec2-54-214-143-173 .compute-1.amazonaws.com 2025-04-01 22:53:13 +00:00 ami-03cf127a
91+ i-10775ea95215edd19 running sam t3.small ec2-54-214-92-78 .compute-1.amazonaws.com 2025-04-01 22:53:13 +00:00 ami-03cf127a
8792```
8893<!-- [[[end]]] -->
8994
@@ -121,8 +126,8 @@ aec ec2 describe -c Name,SubnetId,Volumes,Image.CreationDate
121126
122127 Name SubnetId Volumes Image.CreationDate
123128 ───────────────────────────────────────────────────────────────────────────────
124- alice subnet-3c34502dfd1bc971e ['Size=15 GiB'] 2025-04-01T09:46:15 .000Z
125- sam subnet-3c34502dfd1bc971e ['Size=15 GiB'] 2025-04-01T09:46:15 .000Z
129+ alice subnet-7c7eebe4933bd527a ['Size=15 GiB'] 2025-04-01T22:53:13 .000Z
130+ sam subnet-7c7eebe4933bd527a ['Size=15 GiB'] 2025-04-01T22:53:13 .000Z
126131```
127132<!-- [[[end]]] -->
128133
@@ -217,12 +222,12 @@ aec ec2 subnets
217222
218223 SubnetId VpcId AvailabilityZone CidrBlock Name
219224 ─────────────────────────────────────────────────────────────────────────────────────────────
220- subnet-3c34502dfd1bc971e vpc-b1f00f09091896c57 us-east-1a 172.31.0.0/20
221- subnet-569837d96526af096 vpc-b1f00f09091896c57 us-east-1b 172.31.16.0/20
222- subnet-8a3b095072e46bf09 vpc-b1f00f09091896c57 us-east-1c 172.31.32.0/20
223- subnet-c3e0557e8334ec7b5 vpc-b1f00f09091896c57 us-east-1d 172.31.48.0/20
224- subnet-67ffe1d070fd23148 vpc-b1f00f09091896c57 us-east-1e 172.31.64.0/20
225- subnet-fbfe5e577853e5221 vpc-b1f00f09091896c57 us-east-1f 172.31.80.0/20
225+ subnet-7c7eebe4933bd527a vpc-2d040ead29eee6cf8 us-east-1a 172.31.0.0/20
226+ subnet-3961372401467a0d6 vpc-2d040ead29eee6cf8 us-east-1b 172.31.16.0/20
227+ subnet-c174b5405eaf42d81 vpc-2d040ead29eee6cf8 us-east-1c 172.31.32.0/20
228+ subnet-4d930d9329f0bcd9b vpc-2d040ead29eee6cf8 us-east-1d 172.31.48.0/20
229+ subnet-6029fe0fac51d968a vpc-2d040ead29eee6cf8 us-east-1e 172.31.64.0/20
230+ subnet-1dd87fc3fe137e5aa vpc-2d040ead29eee6cf8 us-east-1f 172.31.80.0/20
226231```
227232<!-- [[[end]]] -->
228233
@@ -236,8 +241,8 @@ aec ec2 sec-groups
236241
237242 GroupId GroupName Description VpcId
238243 ───────────────────────────────────────────────────────────────────────────────────────
239- sg-25d2fabfa34eaa065 default default VPC security group vpc-b1f00f09091896c57
240- default default default vpc-b1f00f09091896c57
244+ sg-af760af3a4fc243fe default default VPC security group vpc-2d040ead29eee6cf8
245+ default default default vpc-2d040ead29eee6cf8
241246```
242247<!-- [[[end]]] -->
243248
0 commit comments