| I recently faced the same issue. later after investing into my cloud-trail logs i found that jenkins role was missing the permission to terminate the instance. Below is the log snippet. "eventName": "TerminateInstances", "awsRegion": "us-west-2", "userAgent": "aws-sdk-java/1.11.457 Linux/4.9.0-6-amd64 OpenJDK_64-Bit_Server_VM/25.212-b01 java/1.8.0_212 groovy/2.4.12", "errorCode": "Client.UnauthorizedOperation", "errorMessage": "You are not authorized to perform this operation. Encoded authorization failure message: After adding the appropriate permission it seems to have resolved. |