Create an EKS Cluster with Amazon Linux 2023
Using AL2023
Provisioning an EKS cluster using AMIs based on Amazon Linux 2023 (AL2023)
follows the same pattern as creating a normal EKS cluster, but requires setting two variables in the IaC environment file
(env.hcl
):
locals {
cluster_inputs = {
ami_id = "ami-0123456789abcdef0" # replace with actual AMI ID
default_ami_type = "AL2023_x86_64_STANDARD"
}
}
This AWS guide describes how to obtain the correct Amazon Linux 2023 AMI ID for your region, which should result in running a command like the following:
aws ssm get-parameter --name /aws/service/eks/optimized-ami/1.30/amazon-linux-2023/x86_64/standard/recommended/image_id --region us-east-2 --query "Parameter.Value" --output text
Once you have obtained the correct AMI ID, set the ami_id
and
default_ami_type
variables in your env.hcl
as shown above, under the
cluster_inputs
section.