Skip to content
v2.275.0

GrantAccessOptions Struct ​

Options for granting access to a cluster.

Example ​

ts
declare const cluster: eks.Cluster;
declare const nodeRole: iam.Role;

// For EKS Auto Mode node roles
cluster.grantAccess('NodeAccess', nodeRole.roleArn, [], { accessEntryType: eks.AccessEntryType.EC2 });

Properties ​

accessEntryTypeoptionalAccessEntryTypeaccess_entry_typeoptionalAccessEntryTypeaccessEntryTypeoptionalAccessEntryTypeAccessEntryTypeoptionalAccessEntryTypeAccessEntryTypeoptionalAccessEntryType#
The type of the access entry.

Default: AccessEntryType.STANDARD - Standard access entry type that supports access policies

notes

Specify AccessEntryType.EC2 for EKS Auto Mode node roles, AccessEntryType.HYBRID_LINUX for EKS Hybrid Nodes, or AccessEntryType.HYPERPOD_LINUX for SageMaker HyperPod.

Note that HYBRID_LINUX and HYPERPOD_LINUX types cannot have access policies attached per AWS EKS API constraints.