From 3a3b56f8eda5b9ff6c9dc3042bdbd2cb536766f4 Mon Sep 17 00:00:00 2001 From: Oliver Mannion <125105+tekumara@users.noreply.github.com> Date: Wed, 24 Jan 2024 21:33:36 +1100 Subject: [PATCH] feat: add ubuntu2204 ami (#447) --- docs/ami.md | 4 ++-- docs/ec2.md | 12 ++++++------ src/aec/command/ami.py | 1 + src/aec/main.py | 2 +- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/docs/ami.md b/docs/ami.md index 643b195..6e874f0 100644 --- a/docs/ami.md +++ b/docs/ami.md @@ -39,8 +39,8 @@ aec ami describe Name ImageId CreationDate RootDeviceName Size ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── - ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20170727 ami-1e749f67 2024-01-09T03:17:41.000Z /dev/sda1 15 - ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170721 ami-785db401 2024-01-09T03:17:41.000Z /dev/sda1 15 + ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-20170727 ami-1e749f67 2024-01-24T09:43:25.000Z /dev/sda1 15 + ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170721 ami-785db401 2024-01-24T09:43:25.000Z /dev/sda1 15 ``` diff --git a/docs/ec2.md b/docs/ec2.md index 1109f25..181f5f6 100644 --- a/docs/ec2.md +++ b/docs/ec2.md @@ -77,10 +77,10 @@ cog.out(f"```\n{docs('aec ec2 describe', ec2.describe(config))}\n```") ``` aec ec2 describe - InstanceId State Name Type DnsName LaunchTime ImageId - ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── - i-f5e6d94c9e2c3afc2 running alice t3.small ec2-54-214-149-72.compute-1.amazonaws.com 2024-01-09 03:17:41+00:00 ami-03cf127a - i-94b729fbf6d605870 running sam t3.small ec2-54-214-85-61.compute-1.amazonaws.com 2024-01-09 03:17:41+00:00 ami-03cf127a + InstanceId State Name Type DnsName LaunchTime ImageId + ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── + i-787bfc64b53337dbb running alice t3.small ec2-54-214-45-74.compute-1.amazonaws.com 2024-01-24 09:43:25+00:00 ami-03cf127a + i-f9f09548c218a73a5 running sam t3.small ec2-54-214-132-201.compute-1.amazonaws.com 2024-01-24 09:43:26+00:00 ami-03cf127a ``` @@ -118,8 +118,8 @@ aec ec2 describe -c Name,SubnetId,Volumes,Image.CreationDate Name SubnetId Volumes Image.CreationDate ────────────────────────────────────────────────────────────────────── - alice subnet-35665c57 ['Size=15 GiB'] 2024-01-09T03:17:41.000Z - sam subnet-35665c57 ['Size=15 GiB'] 2024-01-09T03:17:41.000Z + alice subnet-338b9497 ['Size=15 GiB'] 2024-01-24T09:43:25.000Z + sam subnet-338b9497 ['Size=15 GiB'] 2024-01-24T09:43:25.000Z ``` diff --git a/src/aec/command/ami.py b/src/aec/command/ami.py index 3d15019..3932dea 100644 --- a/src/aec/command/ami.py +++ b/src/aec/command/ami.py @@ -35,6 +35,7 @@ class AmiMatcher(NamedTuple): "ubuntu1604": AmiMatcher(canonical_account_id, "ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64"), "ubuntu1804": AmiMatcher(canonical_account_id, "ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64"), "ubuntu2004": AmiMatcher(canonical_account_id, "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64"), + "ubuntu2204": AmiMatcher(canonical_account_id, "ubuntu/images/hvm-ssd/ubuntu-jammy-22.04-amd64"), } diff --git a/src/aec/main.py b/src/aec/main.py index 11ce3f8..d344759 100644 --- a/src/aec/main.py +++ b/src/aec/main.py @@ -64,7 +64,7 @@ def tag_arg_checker(tag: str) -> str: Arg("--volume-size", type=int, help="EBS volume size (GB). Defaults to AMI volume size."), Arg("--encrypted", type=bool, help="Whether the EBS volume is encrypted", default=True), Arg("--instance-type", type=str, help="Instance type"), - Arg("--key-name", type=str, help="Key name"), + Arg("-k", "--key-name", type=str, help="Key name"), Arg("--userdata", type=str, help="User data file path or http URL"), Arg("-w", "--wait-ssm", action='store_true', help="Wait until the SSM agent is online before exiting"), ]),