Unable to use patch policy for EC2 Windows Server 2019 Instance

0

Hi there, I have created a patch policy in Systems Manager for one of my Windows server instances but it returned the following Access Denied error.

I have attempted the following but no success..

  • Updated SSM agent to the latest version
  • Added the required AmazonSSMManagedInstanceCore permissions
  • Created IAM policy to update patch baseline
  • Used custom cron expression instead of the default schedule to see if there's any difference but had the same Access Denied error.

Seems like some permission issue but just not sure which exact part to look at. Could be something within the server. Has anyone else experienced this error before?

**Invoke-PatchBaselineOperation : Access Denied At C:\ProgramData\Amazon\SSM\InstanceData\document\orchestration\f41cf6bb-bf64-4908-8aa0-095bfe0102 b8\PatchWindows_script.ps1:219 char:13

  • $response = Invoke-PatchBaselineOperation -Operation Scan -SnapshotId ...
  •         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OperationStopped: (Amazon.Patch.Ba...UpdateOperation:FindWindowsUpdateOperation) [Invoke -PatchBaselineOperation], AmazonS3Exception
    • FullyQualifiedErrorId : PatchBaselineOperations,Amazon.Patch.Baseline.Operations.PowerShellCmdlets.InvokePatchBa selineOperation

failed to run commands: exit status 0xffffffff**

질문됨 일 년 전688회 조회
1개 답변
0

Hello, This issue is specifically related to IAM permission. I understand that you have AmazonSSMManagedInstanceCore policy attached to the IAM role. Addition to this policy you also need S3 permission. Add "S3 full permission " to the IAM role. Once done try to perform patching and see how it goes.

답변함 일 년 전
  • Hi Damini_K, Thanks for your response! Unfortunately, I do already have that permission associated with the instance but still having the same error. These are the permissions associated currently:

    AmazonEC2RoleforSSM AmazonS3FullAccess AmazonSSMManagedInstanceCore AmazonSSMFullAccess

    I have also made sure the 'Configure Automatic Updates' in group policy is set to disabled in the server to allow patch manager to handle updates. Any insight on this issue is greatly appreciated

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠