Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish AMI IDs in Parameter Store indexed by release version #1843

Open
Nuru opened this issue Jun 11, 2024 · 0 comments
Open

Publish AMI IDs in Parameter Store indexed by release version #1843

Nuru opened this issue Jun 11, 2024 · 0 comments

Comments

@Nuru
Copy link

Nuru commented Jun 11, 2024

What would you like to be added:

Currently, you can find the AMI ID for an AMI by retrieving a public SSM parameter. The path varies by Kubernetes Version, OS, Special Features (e.g. GPU support), and Architecture. To get the latest AMI ID, you can do this (or something like it for other OSes):

aws ssm get-parameter --name \
/aws/service/eks/optimized-ami/1.29/amazon-linux-2023/arm64/standard/recommended/image_id

What I would like to be added is the ability to replace "recommended" with a release version, like 1.29.3-20240531, and be able to get the AMI ID with queries like this:

aws ssm get-parameter --name \
/aws/service/eks/optimized-ami/1.29/amazon-linux-2023/arm64/standard/1.29.3-20240531/image_id

aws ssm get-parameter --name \
/aws/service/eks/optimized-ami/1.29/amazon-linux-2-arm64/1.29.3-20240531/image_id

Instead of being able to use a consistent release version across multiple OS variants, I have to use a variant-specific AMI Name to get the AMI:

aws ssm get-parameter --name \
/aws/service/eks/optimized-ami/1.29/amazon-linux-2023/arm64/standard/amazon-eks-node-al2023-arm64-standard-1.29-v20240531/image_id

aws ssm get-parameter --name \
/aws/service/eks/optimized-ami/1.29/amazon-linux-2-arm64/amazon-eks-arm64-node-1.29-v20240531/image_id

This is tedious and error prone.

Why is this needed:

If I want to use AMI IDs in launch templates, and keep my systems on a consistent release that is not the latest, it would be much easier if I could just specify the release version for all the variants, as can be done in the node group API. Instead, in order to use the public parameters and get AMI IDs for various regions, I have to specify different AMI names for different variants, and it is very easy to get the wrong name paired with the variant, e.g.

aws ssm get-parameter --name \
/aws/service/eks/optimized-ami/1.29/amazon-linux-2023/x86_64/standard/amazon-eks-node-al2023-arm64-standard-1.29-v20240531/image_id

Note that this should be relatively easy to do, and is fully backward compatible, in that you do not need to unpublish anything.

See also #531

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant