Skip to main content

nodegroups

Creates, updates, deletes, gets or lists a nodegroups resource.

Overview

Namenodegroups
TypeResource
Idaws.eks.nodegroups

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
ami_typestringIf the node group was deployed using a launch template with a custom AMI, then this is CUSTOM. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration. (AL2_x86_64, AL2_x86_64_GPU, AL2_ARM_64, CUSTOM, BOTTLEROCKET_ARM_64, BOTTLEROCKET_x86_64, BOTTLEROCKET_ARM_64_FIPS, BOTTLEROCKET_x86_64_FIPS, BOTTLEROCKET_ARM_64_NVIDIA, BOTTLEROCKET_x86_64_NVIDIA, BOTTLEROCKET_ARM_64_NVIDIA_FIPS, BOTTLEROCKET_x86_64_NVIDIA_FIPS, WINDOWS_CORE_2019_x86_64, WINDOWS_FULL_2019_x86_64, WINDOWS_CORE_2022_x86_64, WINDOWS_FULL_2022_x86_64, WINDOWS_CORE_2025_x86_64, WINDOWS_FULL_2025_x86_64, AL2023_x86_64_STANDARD, AL2023_ARM_64_STANDARD, AL2023_x86_64_NEURON, AL2023_x86_64_NVIDIA, AL2023_ARM_64_NVIDIA)
capacity_typestringThe capacity type of your managed node group. (ON_DEMAND, SPOT, CAPACITY_BLOCK)
cluster_namestringThe name of your cluster.
created_atstring (date-time)The Unix epoch timestamp at object creation.
disk_sizeintegerIf the node group wasn't deployed with a launch template, then this is the disk size in the node group configuration. If the node group was deployed with a launch template, then this is null.
healthobjectThe health status of the node group. If there are issues with your node group's health, they are listed here.
instance_typesarrayIf the node group wasn't deployed with a launch template, then this is the instance type that is associated with the node group. If the node group was deployed with a launch template, then this is null.
labelsobjectThe Kubernetes labels applied to the nodes in the node group. Only labels that are applied with the Amazon EKS API are shown here. There may be other Kubernetes labels applied to the nodes in this group.
launch_templateobjectAn object representing a node group launch template specification. The launch template can't include SubnetId , IamInstanceProfile , RequestSpotInstances , HibernationOptions , or TerminateInstances , or the node group deployment or update will fail. For more information about launch templates, see CreateLaunchTemplate in the Amazon EC2 API Reference. For more information about using launch templates with Amazon EKS, see Customizing managed nodes with launch templates in the Amazon EKS User Guide. You must specify either the launch template ID or the launch template name in the request, but not both.
modified_atstring (date-time)The Unix epoch timestamp for the last modification to the object.
node_repair_configobjectThe node auto repair configuration for the node group.
node_rolestringThe IAM role associated with your node group. The Amazon EKS node kubelet daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies.
nodegroup_arnstringThe Amazon Resource Name (ARN) associated with the managed node group.
nodegroup_namestringThe name associated with an Amazon EKS managed node group.
release_versionstringIf the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was specified in the launch template. For node groups that weren't deployed using a launch template, this is the version of the Amazon EKS optimized AMI that the node group was deployed with.
remote_accessobjectAn object representing the remote access configuration for the managed node group.
resourcesobjectThe resources associated with the node group, such as Auto Scaling groups and security groups for remote access.
scaling_configobjectAn object representing the scaling configuration details for the Auto Scaling group that is associated with your node group. When creating a node group, you must specify all or none of the properties. When updating a node group, you can specify any or none of the properties.
statusstringThe current status of the managed node group. (CREATING, ACTIVE, UPDATING, DELETING, CREATE_FAILED, DELETE_FAILED, DEGRADED)
subnetsarrayThe subnets that were specified for the Auto Scaling group that is associated with your node group.
tagsobjectMetadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.
taintsarrayThe Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of No_Schedule, Prefer_No_Schedule, or No_Execute. Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see Node taints on managed node groups.
update_configobjectThe node group update configuration. An Amazon EKS managed node group updates by replacing nodes with new nodes of newer AMI versions in parallel. You choose the maximum unavailable and the update strategy.
versionstringThe Kubernetes version of the managed node group.
warm_pool_configobjectThe configuration for an Amazon EC2 Auto Scaling warm pool attached to an Amazon EKS managed node group. Warm pools maintain pre-initialized EC2 instances alongside your Auto Scaling group that have already completed the bootup initialization process and can be kept in a Stopped, Running, or Hibernated state.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_nodegroupselectname, nodegroup_name, regionDescribes a managed node group.
list_nodegroupsselectname, regionmaxResults, nextTokenLists the managed node groups associated with the specified cluster in your Amazon Web Services account in the specified Amazon Web Services Region. Self-managed node groups aren't listed.
create_nodegroupinsertname, region, nodegroupName, subnets, nodeRoleCreates a managed node group for an Amazon EKS cluster. You can only create a node group for your cluster that is equal to the current Kubernetes version for the cluster. All node groups are created with the latest AMI release version for the respective minor Kubernetes version of the cluster, unless you deploy a custom AMI using a launch template. For later updates, you will only be able to update a node group using a launch template only if it was originally deployed with a launch template. Additionally, the launch template ID or name must match what was used when the node group was created. You can update the launch template version with necessary changes. For more information about using launch templates, see Customizing managed nodes with launch templates. An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by Amazon Web Services for an Amazon EKS cluster. For more information, see Managed node groups in the Amazon EKS User Guide. Windows AMI types are only supported for commercial Amazon Web Services Regions that support Windows on Amazon EKS.
update_nodegroup_configupdatename, nodegroup_name, regionUpdates an Amazon EKS managed node group configuration. Your node group continues to function during the update. The response output includes an update ID that you can use to track the status of your node group update with the DescribeUpdate API operation. You can update the Kubernetes labels and taints for a node group and the scaling and version update configuration.
delete_nodegroupdeletename, nodegroup_name, regionDeletes a managed node group.
update_nodegroup_versionexecname, nodegroup_name, regionUpdates the Kubernetes version or AMI version of an Amazon EKS managed node group. You can update a node group using a launch template only if the node group was originally deployed with a launch template. Additionally, the launch template ID or name must match what was used when the node group was created. You can update the launch template version with necessary changes. If you need to update a custom AMI in a node group that was deployed with a launch template, then update your custom AMI, specify the new ID in a new version of the launch template, and then update the node group to the new version of the launch template. If you update without a launch template, then you can update to the latest available AMI version of a node group's current Kubernetes version by not specifying a Kubernetes version in the request. You can update to the latest AMI version of your cluster's current Kubernetes version by specifying your cluster's Kubernetes version in the request. For information about Linux versions, see Amazon EKS optimized Amazon Linux AMI versions in the Amazon EKS User Guide. For information about Windows versions, see Amazon EKS optimized Windows AMI versions in the Amazon EKS User Guide. You cannot roll back a node group to an earlier Kubernetes version or AMI version. When a node in a managed node group is terminated due to a scaling action or update, every Pod on that node is drained first. Amazon EKS attempts to drain the nodes gracefully and will fail if it is unable to do so. You can force the update if Amazon EKS is unable to drain the nodes as a result of a Pod disruption budget issue.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
namestringThe name of your cluster.
nodegroup_namestringThe name of the managed node group to update.
regionstringAWS region (default: us-east-1)
maxResultsintegerThe maximum number of results, returned in paginated output. You receive maxResults in a single page, along with a nextToken response element. You can see the remaining results of the initial request by sending another request with the returned nextToken value. This value can be between 1 and 100. If you don't use this parameter, 100 results and a nextToken value, if applicable, are returned.
nextTokenstringThe nextToken value returned from a previous paginated request, where maxResults was used and the results exceeded the value of that parameter. Pagination continues from the end of the previous results that returned the nextToken value. This value is null when there are no more results to return. This token should be treated as an opaque identifier that is used only to retrieve the next items in a list and not for other programmatic purposes.

SELECT examples

Describes a managed node group.

SELECT
ami_type,
capacity_type,
cluster_name,
created_at,
disk_size,
health,
instance_types,
labels,
launch_template,
modified_at,
node_repair_config,
node_role,
nodegroup_arn,
nodegroup_name,
release_version,
remote_access,
resources,
scaling_config,
status,
subnets,
tags,
taints,
update_config,
version,
warm_pool_config
FROM aws.eks.nodegroups
WHERE name = '{{ name }}' -- required
AND nodegroup_name = '{{ nodegroup_name }}' -- required
AND region = '{{ region }}' -- required
;

INSERT examples

Creates a managed node group for an Amazon EKS cluster. You can only create a node group for your cluster that is equal to the current Kubernetes version for the cluster. All node groups are created with the latest AMI release version for the respective minor Kubernetes version of the cluster, unless you deploy a custom AMI using a launch template. For later updates, you will only be able to update a node group using a launch template only if it was originally deployed with a launch template. Additionally, the launch template ID or name must match what was used when the node group was created. You can update the launch template version with necessary changes. For more information about using launch templates, see Customizing managed nodes with launch templates. An Amazon EKS managed node group is an Amazon EC2 Auto Scaling group and associated Amazon EC2 instances that are managed by Amazon Web Services for an Amazon EKS cluster. For more information, see Managed node groups in the Amazon EKS User Guide. Windows AMI types are only supported for commercial Amazon Web Services Regions that support Windows on Amazon EKS.

INSERT INTO aws.eks.nodegroups (
nodegroupName,
scalingConfig,
diskSize,
subnets,
instanceTypes,
amiType,
remoteAccess,
nodeRole,
labels,
taints,
tags,
clientRequestToken,
launchTemplate,
updateConfig,
nodeRepairConfig,
capacityType,
version,
releaseVersion,
warmPoolConfig,
name,
region
)
SELECT
'{{ nodegroupName }}' /* required */,
'{{ scalingConfig }}',
{{ diskSize }},
'{{ subnets }}' /* required */,
'{{ instanceTypes }}',
'{{ amiType }}',
'{{ remoteAccess }}',
'{{ nodeRole }}' /* required */,
'{{ labels }}',
'{{ taints }}',
'{{ tags }}',
'{{ clientRequestToken }}',
'{{ launchTemplate }}',
'{{ updateConfig }}',
'{{ nodeRepairConfig }}',
'{{ capacityType }}',
'{{ version }}',
'{{ releaseVersion }}',
'{{ warmPoolConfig }}',
'{{ name }}',
'{{ region }}'
RETURNING
nodegroup
;

UPDATE examples

Updates an Amazon EKS managed node group configuration. Your node group continues to function during the update. The response output includes an update ID that you can use to track the status of your node group update with the DescribeUpdate API operation. You can update the Kubernetes labels and taints for a node group and the scaling and version update configuration.

UPDATE aws.eks.nodegroups
SET
labels = '{{ labels }}',
taints = '{{ taints }}',
scalingConfig = '{{ scalingConfig }}',
updateConfig = '{{ updateConfig }}',
nodeRepairConfig = '{{ nodeRepairConfig }}',
warmPoolConfig = '{{ warmPoolConfig }}',
clientRequestToken = '{{ clientRequestToken }}'
WHERE
name = '{{ name }}' --required
AND nodegroup_name = '{{ nodegroup_name }}' --required
AND region = '{{ region }}' --required
RETURNING
update;

DELETE examples

Deletes a managed node group.

DELETE FROM aws.eks.nodegroups
WHERE name = '{{ name }}' --required
AND nodegroup_name = '{{ nodegroup_name }}' --required
AND region = '{{ region }}' --required
;

Lifecycle Methods

Updates the Kubernetes version or AMI version of an Amazon EKS managed node group. You can update a node group using a launch template only if the node group was originally deployed with a launch template. Additionally, the launch template ID or name must match what was used when the node group was created. You can update the launch template version with necessary changes. If you need to update a custom AMI in a node group that was deployed with a launch template, then update your custom AMI, specify the new ID in a new version of the launch template, and then update the node group to the new version of the launch template. If you update without a launch template, then you can update to the latest available AMI version of a node group's current Kubernetes version by not specifying a Kubernetes version in the request. You can update to the latest AMI version of your cluster's current Kubernetes version by specifying your cluster's Kubernetes version in the request. For information about Linux versions, see Amazon EKS optimized Amazon Linux AMI versions in the Amazon EKS User Guide. For information about Windows versions, see Amazon EKS optimized Windows AMI versions in the Amazon EKS User Guide. You cannot roll back a node group to an earlier Kubernetes version or AMI version. When a node in a managed node group is terminated due to a scaling action or update, every Pod on that node is drained first. Amazon EKS attempts to drain the nodes gracefully and will fail if it is unable to do so. You can force the update if Amazon EKS is unable to drain the nodes as a result of a Pod disruption budget issue.

EXEC aws.eks.nodegroups.update_nodegroup_version
@name='{{ name }}' --required,
@nodegroup_name='{{ nodegroup_name }}' --required,
@region='{{ region }}' --required
@@json=
'{
"version": "{{ version }}",
"releaseVersion": "{{ releaseVersion }}",
"launchTemplate": "{{ launchTemplate }}",
"force": {{ force }},
"clientRequestToken": "{{ clientRequestToken }}"
}'
;