Skip to main content

AWS050 - AWS Security Group Not Found

Uploading...Agent error code #AWS050 indicates that AWS could not find the security group configured on the knoc. AWS returns InvalidGroup.NotFound or InvalidGroupId.Malformed in this situation.

Common causes include:

    The security group was deleted after the knoc was configured The Security Group ID on the knoc has a typo, or is a group name rather than an ID The group exists in a different region from the one configured on the knoc The group belongs to a different AWS account from the credentials in use

    Steps to Resolve

    Confirm the Security Group ID

      In the AWS console, go to EC2 > Security Groups Locate the group intended for use with Knocknoc Copy the ID, which is the sg- value, not the group name Paste it into the Security Group ID field of the Knocknoc backend configuration

      Confirm the Region

      Security group IDs are unique per region, so the same ID does not resolve from a different one.

        Check the region selector in the AWS console against the Region field on the knoc Correct whichever is wrong

        Confirm the Account

        Run the following from the agent host to see which account the credentials belong to:

        sudo -u knocknoc aws sts get-caller-identity --region <region>
        

        If the account differs from the one holding the security group, the credentials or the group is the wrong one.

        Verify the Group Directly

        sudo -u knocknoc aws ec2 describe-security-groups --group-ids sg-0123456789abcdef0 --region <region>
        

        A successful call returns the group. InvalidGroup.NotFound confirms it is absent from that account and region.