Skip to main content

AWS005 - No AWS Credentials Found

Uploading...Agent error code #AWS005 indicates that the integration is set to use the agent's own AWS identity, and the agent found none. The AWS CLI searched its default credential chain (environment variables, a web identity token for IRSA, EKS Pod Identity, an ECS task role, an EC2 instance profile) and every source came up empty.

Common causes include:

    The agent runs in a pod whose service account has no eks.amazonaws.com/role-arn annotation, or no Pod Identity association The EC2 instance has no instance profile attached, or IMDS is disabled or limited to a hop count the agent's container cannot reach The ECS task definition has no task role The agent's user cannot read the projected service account token file A credential the host held has lapsed, such as an expired SSO profile or a token file that stopped being refreshed The agent was meant to use an access key, and the integration was switched to the agent's identity by mistake

    Steps to Resolve

    Check What the Agent Host Resolves

    Run this as the agent's user, on the agent host or in its container:

    aws sts get-caller-identity
    

    A working setup prints the account and the ARN of the role. An error saying it is unable to locate credentials is this fault.

    Give the Agent an Identity

      EKS with IRSA: annotate the agent's service account with eks.amazonaws.com/role-arn: <role ARN> and restart the pod. If the agent does not run as root, set fsGroup in the pod security context so it can read the token file. EKS Pod Identity: create a Pod Identity association for the agent's namespace and service account. EC2: attach an instance profile whose role holds the Knocknoc policy. In a container, allow an IMDSv2 hop limit of 2. ECS or Fargate: set a task role on the task definition.

      Use an Access Key Instead

        In the Knocknoc admin interface, open the AWS integration Turn off Use the agent's own AWS identity Enter an access key ID and secret access key, then save