How can I generate a log bundle for my Amazon EKS instances?

Last updated: 2021-01-04

I'm troubleshooting an Amazon Elastic Kubernetes Service (Amazon EKS) instance. I need to collect all the relevant Amazon EKS logs associated with that instance.

Short description

You can use the AWSSupport-CollectEKSInstanceLogs automation document to collect your Amazon EKS logs.

Important: For the automation to work, you must install and run the SSM Agent on your Amazon EKS instance.


  1. Open the AWS Systems Manager console.
  2. In the navigation pane, choose Automation.
  3. Choose Execute automation.
  4. On the Owned by Amazon tab, in the Automation document search box, enter EKSInstanceLogs, and then select the AWSSupport-CollectEKSInstanceLogs document.
  5. Choose Next.
  6. On the Automation Inputs page, for EKSInstanceId, enter your target Amazon EKS instance ID.
  7. Set the LogDestination and AutomationAssumeRole parameters.
    Note: The log bundle is uploaded to the Amazon Simple Storage Service (Amazon S3) bucket specified in the LogDestination field. If you didn't specify a bucket, then you can retrieve the log bundle from the instance. The log bundle is saved locally in the /var/log/ path.
  8. Choose Execute automation.

Note: It's a best practice to attach the Amazon managed AmazonSSMManagedInstanceCore policy to an AWS Identity and Access Management (IAM) role for the Amazon Elastic Compute Cloud (Amazon EC2) instance that's targeted for automation. If the user provides the S3 bucket name by the time the automation is running (in the LogDestination field), then the instance profile will have the appropriate permissions to write to the bucket. To run the automation and send the command to the instance, you must have at least the ssm:ExecuteAutomation and ssm:SendCommand permissions. To read the automation output, you must have the ssm:GetAutomationExecution permission.

Did this article help?

Do you need billing or technical support?