Skip to content

Amazon Linux 2023

Template variables

Variable Description
ami_component_description
ami_description
ami_name
ami_regions
ami_users
arch
associate_public_ip_address
aws_region
binary_bucket_name
binary_bucket_region
containerd_version
creator
custom_endpoint_ec2
enable_accelerator Vendor that provides the GPU or accelerator hardware. Currently we support Neuron and NVIDIA.
enable_efa Valid options are true or false. Wheather or not to install the software needed to use AWS Elastic Fabric Adapter (EFA) network interfaces.
enable_fips Install openssl and enable fips related kernel parameters
enable_nvidia_gdrcopy_driver
enable_pod_isolation Valid options are true or false. Defaults to false and stays false for published AMIs. Whether or not to install the pod isolation runtime, which runs pods under the isolated-sandbox and confidential-sandbox runtime classes inside their own Firecracker microVM.
encrypted
iam_instance_profile The name of an IAM instance profile to launch the EC2 instance with.
install_containerd_from_s3
instance_type
kms_key_id
kubernetes_build_date
kubernetes_version
launch_block_device_mappings_volume_size
nodeadm_build_image Image to use as a build environment for nodeadm
nvidia_driver_lts_version Major NVIDIA driver version for the lts tree. Must be set together with nvidia_driver_pb_version.
nvidia_driver_pb_version Major NVIDIA driver version for the pb tree. Must be set together with nvidia_driver_lts_version.
nvidia_gdrcopy_driver_version
nvidia_grid_runfile_bucket_name Bucket name for sourcing the Nvidia GRID runfile
nvidia_repository_url YUM/DNF Repository override for the NVIDIA driver packages
pause_container_image Image ref for the pause container image
pod_isolation_firecracker_version Firecracker release that Firecracker and the jailer are installed from: latest (the default) or a version such as v1.18.0. The build fails if it resolves to a release older than v1.18.0. The tarball is verified against the release's published .sha256.txt.
remote_folder Directory path for shell provisioner scripts on the builder instance
runc_version
security_group_id
skip_profile_validation
source_ami_filter_name
source_ami_id
source_ami_owners
ssh_interface If using session_manager, you need to specify a non-minimal ami as the minimal version does not have the SSM agent installed.
ssh_username
ssm_agent_version Version of the SSM agent to install from the S3 bucket provided by the SSM agent project, such as latest. If empty, the latest version of the SSM agent available in the Amazon Linux core repositories will be installed.
subnet_id
temporary_key_pair_type
temporary_security_group_source_cidrs
user_data_file Path to a file that will be used for the user data when launching the instance.
volume_type
working_dir Directory path for ephemeral resources on the builder instance

Accelerated images

One can build images that contain Neuron or Nvidia drivers and runtime configuration. To build Neuron image execute:

make k8s=1.29 os_distro=al2023 enable_accelerator=neuron enable_efa=true

To build an NVIDIA image:

make k8s=1.29 os_distro=al2023 enable_accelerator=nvidia enable_efa=true

The lts and pb driver trees default to major versions 580 and 595; set nvidia_driver_lts_version and nvidia_driver_pb_version to override. To see which driver versions are available, one can check the NVIDIA AL2023 repository.

Pod isolation images

To build an image with support for EC2 Nitro Sandboxes, execute:

make k8s=1.36 os_distro=al2023 enable_pod_isolation=true

Nodes from this image run each pod that sets runtimeClassName to isolated-sandbox or confidential-sandbox in its own Nitro Sandbox, a Firecracker microVM isolated by the AWS Nitro System. Every other pod keeps running under runc.

The build: - installs the Nitro Sandboxes runtime (containerd-shim-nitro-sandbox-v2) and the guest image (nitro-sandbox-guest.eif and nitro-sandbox-guest-disk.img) from the same <kubernetes version>/<build date> bundle as the other node components - installs Firecracker and the jailer from the Firecracker releases, the latest release by default. Set pod_isolation_firecracker_version to pin one; it must be v1.18.0 or later - requires an Amazon Linux 2023 kernel of 6.18.51 or later, and reserves the Nitro Sandbox memory pool with the nitro_enclaves.mempool kernel parameter - configures containerd with the isolated-sandbox and confidential-sandbox runtime handlers, runs the CRI proxy in front of kubelet, and labels the node eks.amazonaws.com/nitro-sandbox=true

This feature is supported on Kubernetes 1.36 and 1.37. The AMI name gets a -pod-isolation suffix.

To run sandboxed pods, launch nodes from the image on an instance type that supports Nitro Sandboxes, with Nitro Enclaves enabled (EnclaveOptions.Enabled=true in the launch template), and install the isolated-sandbox and confidential-sandbox RuntimeClass objects in the cluster. See Create and update a Nitro Sandbox AMI in the Amazon EKS User Guide.

Pause Container Image

Since PR #2000, the pause container image is no longer pulled in at runtime on AL2023. nodeadm uses a static pause container reference to populate the sandbox_image field of the containerd config.toml, which is baked into the AMI during the build based on the packer template variable pause_container_image.

The default for pause_container_image points to an EKS-owned ECR image, but you can also use another pause image entirely such as registry.k8s.io/pause.

If you need coordinates for a different ECR image in another region, see https://docs.aws.amazon.com/eks/latest/userguide/add-ons-images.html for a list of region-specific registries that hold identical repositories.

Additionally, if you would like to use a FIPS endpoint, this will require just a minor change to the registry URI:

-<ACCOUNT_ID>.dkr.ecr.<REGION>.<DOMAIN>"
+<ACCOUNT_ID>.dkr.ecr-fips.<REGION>.<DOMAIN>"