`remote_access` not working for EKS node groups


I am using this module to create an EKS cluster. Everything works well, but when I add a remote_access config, terraform apply fails with the following error:

Error: creating EKS Node Group [REDACTED] InvalidParameterException: Remote access configuration cannot be specified with a launch template.

Any idea on what I’m doing wrong? Here is the code:

module "eks" {
  source  = "terraform-aws-modules/eks/aws"
  version = "18.31"
  cluster_name    = "REDACTED"
  cluster_version = "1.25"

  vpc_id     = module.vpc.vpc_id
  subnet_ids = slice(module.vpc.private_subnets, 0, 2)

  enable_irsa = true
  eks_managed_node_groups = {
    mygroup = {
      instance_types = ["t3.large"]
      create_security_group = false
      enable_monitoring = false
      min_size = 2
      max_size = 2
      desired_size = 2
      remote_access = {
        ec2_ssh_key = "mysshkeypair"
  cloudwatch_log_group_retention_in_days = 3
  cluster_enabled_log_types              = []

Thanks for your help!

This isn’t a Terraform issue - AWS is informing you that it does not support the combination of settings you have used.

@maxb I fail to see where I am configuring a launch template… Could you please double-check my code? Thanks

You aren’t doing so explicitly - but it seems the module you are using does so by default.

It says so in its documentation: terraform-aws-eks/compute_resources.md at master · terraform-aws-modules/terraform-aws-eks · GitHub

but in my opinion, in order to successfully use a module like this which is passing so much configuration through to underlying AWS APIs, its only realistic to expect to have to read through the source code of the module itself, to understand in full what it is doing for you.

Thanks @maxb for pointing out the docs. I tried to set use_custom_launch_template = false but I still have the same problem…