Solved: AWS Inspector issue : Service 'Amazon Web Services Agent'(AWSAgent) could not be stopped. Verify that you have sufficientprivileges to stop system services.

AWS Inspector issue
“Service ‘Amazon Web Services Agent’ (AWSAgent) could not be stopped. Verify that you have sufficient privileges to stop system services.”

Solution:-

First check that you are running the AWS inspector installation as administrator. But if you are still getting error then it can be because the most recent Amazon Windows AMIs released on February 23rd include a driver that uses the same service name as the Amazon Inspector Agent. This causes Inspector Agent installations to fail with the above error message. Impacted versions of the Windows AMIs include Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, and Windows Server 2016.

Try fixing it with the remove script provided in below forum link after taking all the required backups.

https://forums.aws.amazon.com/ann.jspa?annID=5505

But if you are still getting error “EC2 Windows Utility Device’ not found” when you execute the remove script follow below steps.

  • Take snapshot image of the instance.
  • After taking snapshot image login to the instance and execute below command in powershell as an administrator to fix it. It will need reboot of instance.
$agentService = Get-WmiObject -class win32_systemdriver | Where-Object {$_.Name -eq 'awsagent'}$agentService.Delete()
  • After running these commands reboot the instance and try installation of AWS Inspector again.

No comments:

Post a Comment