Posted On: Sep 18, 2019
Amazon Elastic Kubernetes Service (Amazon EKS) now allows you to dynamically retrieve the latest EKS-Optimized Amazon Machine Image (AMI) ID when adding nodes to a cluster.
It is a best practice to use the latest version of the EKS-Optimized AMI when you add nodes to an EKS cluster, as new releases include Kubernetes patches and security updates. Previously, to ensure you were using the latest AMI meant checking the EKS documentation and manually updating any deployment templates or resources with the new AMI ID.
Now, you can query the AWS Systems Manager (SSM) Parameter Store API to get the latest AMI version ID for a specific version of Kubernetes. You can query the SSM Parameter Store API using the AWS CLI, any of the AWS SDKs, or directly from CloudFormation templates.
To see the latest EKS-Optimized Amazon Linux AMI information for a particular version of Kubernetes in your default region, run this AWS CLI command in your terminal:
aws ssm get-parameters --names /aws/service/eks/optimized-ami/1.14/amazon-linux-2/recommended
To learn more, visit the Amazon EKS documentation. Get more information about Amazon EKS on the product page.