Help improve this page
Want to contribute to this user guide? Scroll to the bottom of this page and select Edit this page on GitHub. Your contributions will help make our user guide better for everyone.
Retrieve recommended Bottlerocket AMI IDs
You can retrieve the Amazon Machine Image (AMI) ID for Amazon EKS optimized AMIs by querying
the AWS Systems Manager Parameter Store API. Using this parameter, you don't need to manually look up
Amazon EKS optimized AMI IDs. For more information about the Systems Manager Parameter Store API, see
GetParameter. The IAM principal that you use must have the ssm:GetParameter
IAM permission to retrieve the Amazon EKS
optimized AMI metadata.
You can retrieve the image ID of the latest recommended Amazon EKS optimized
Bottlerocket AMI with the following AWS CLI command, which uses the
sub-parameter image_id
. Make the following modifications to the command as
needed and then run the modified command:
-
Replace
with a supported Amazon EKS version.kubernetes-version
-
Replace
with one of the following options.-flavor
-
Remove
for variants without a GPU.-flavor
-
Use
-nvidia
for GPU-enabled variants.
-
-
Replace
with one of the following options.architecture
-
Use
x86_64
forx86
based instances. -
Use
arm64
for ARM instances.
-
-
Replace
with an Amazon EKS supported AWS Region for which you want the AMI ID.region-code
aws ssm get-parameter --name /aws/service/bottlerocket/aws-k8s-
kubernetes-version
-flavor
/architecture
/latest/image_id \ --regionregion-code
--query "Parameter.Value" --output text
Here's an example command after placeholder replacements have been made.
aws ssm get-parameter --name /aws/service/bottlerocket/aws-k8s-
1.30
/x86_64
/latest/image_id \ --regionus-west-2
--query "Parameter.Value" --output text
An example output is as follows.
ami-1234567890abcdef0