Promtail Deployment on EC2: error in DescribeInstances

I’m getting this cryptic error code. I specified a role with the DescribeInstances permissions in the scrape config file… When running this command,

./promtail-linux-amd64 -config.file=./ec2-promtail.yaml --dry-run

I get this error

level=error ts=2023-01-27T05:48:26.991897883Z caller=refresh.go:99 component=discovery discovery=ec2 msg=“Unable to refresh target groups” err=“could not describe instances: SerializationError: failed to unmarshal error message\n\tstatus code: 400, request id: 30e61a40-220d-4fb4-8d65-3953a7f00c3b\ncaused by: UnmarshalError: failed to unmarshal error message\n\t00000000 3c45 72 72 6f 72 52 65 73 70 6f 6e 73 65 20 78 |<ErrorResponse x|\n00000010 6d 6c 6e 73 3d 22 68 74 74 70 3a 2f 2f 77 65 62 |mlns="http://web|\n00000020 73 65 72 76 69 63 65 73 2e 61 6d 61 7a 6f 6e 2e |services.amazon.|\n00000030 63 6f 6d 2f 41 57 53 46 61 75 6c 74 2f 32 30 30 |com/AWSFault/200|\n00000040 35 2d 31 35 2d 30 39 22 3e 0a 20 20 3c 45 72 72 |5-15-09">. <Err|\n00000050 6f 72 3e 0a 20 20 20 20 3c 54 79 70 65 3e 53 65 |or>. Se|\n00000060 6e 64 65 72 3c 2f 54 79 70 65 3e 0a 20 20 20 20 |nder. |\n00000070 3c 43 6f 64 65 3e 49 6e 76 61 6c 69 64 41 63 74 |InvalidAct|\n00000080 69 6f 6e 3c 2f 43 6f 64 65 3e 0a 20 20 20 20 3c |ion. <|\n00000090 4d 65 73 73 61 67 65 3e 43 6f 75 6c 64 20 6e 6f |Message>Could no|\n000000a0 74 20 66 69 6e 64 20 6f 70 65 72 61 74 69 6f 6e |t find operation|\n000000b0 20 44 65 73 63 72 69 62 65 49 6e 73 74 61 6e 63 | DescribeInstanc|\n000000c0 65 73 20 66 6f 72 20 76 65 72 73 69 6f 6e 20 32 |es for version 2|\n000000d0 30 31 36 2d 31 31 2d 31 35 3c 2f 4d 65 73 73 61 |016-11-15</Messa|\n000000e0 67 65 3e0a 20 20 3c 2f 45 72 72 6f 72 3e 0a 20 |ge>. . |\n000000f0 20 3c 52 65 71 75 65 73 74 49 64 3e 33 30 65 36 | 30e6|\n00000100 31 61 34 30 2d 32 32 30 64 2d 34 6662 34 2d 38 |1a40-220d-4fb4-8|\n00000110 64 36 35 2d 33 39 35 33 61 37 66 30 30 63 33 62 |d65-3953a7f00c3b|\n00000120 3c 2f 52 65 71 75 65 73 74 49 64 3e 0a 3c 2f 45 |.</E|\n00000130 72 72 6f 72 52 65 73 70 6f 6e 73 65 3e 0a |rrorResponse>.|\n\ncaused by: expected element type but have ”

For ease of reading, it goes something like this:
<ErrorResponse “http://webservices.amazon.com/AWSFault/200. Sender. InvalidAction. <|Message>Could not find operation DescribeInstances for version 2. . | 2bbe..caused by: expected element type but have ”

Is this a bug or is the configuration wrong

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.