AWS-RunPatchBaseline in SSM with EC2 in private subnets


Ok, So I am kind of stuck here and don't know where to go from here. I am trying to understand how SSM works to patch EC2 in a private subnet and I keep getting this error.

Unable to download payload: to run commands: exit status 156

I have my EC2 instance under Fleet Manager. I have my Maintenance window set and SSM can start the EC2 instance and stop it before it runs the task for AWS-RunPatchBaseline. The role that is attached to my EC2 instance has the following.

AmazonSSMManagedInstanceCore AmazonSSMPatchAssociation aws-quicksetup-patchpolicy-baselineoverrides-s3 and this policy...

    "Version": "2012-10-17",
    "Statement": [
            "Effect": "Allow",
            "Action": "s3:GetObject",
            "Resource": [

I then go into the run command under systems manager to test just the task that has the AWS-RunPatchBaseline document and I still get the same error. I guess my question is the role that is listed under the task is the role that should be granted the rights to do what ever and the access to whatever is needed to perform the patching or is it the role that shows up as attached to the EC2 instance during QuickSetup. I have given all of them both the access and not sure why it can't access the s3 bucket.

I can telnet from the EC2 to that s3 bucket.

telnet 443
Connected to
Escape character is '^]'.

Thanks in advance.

asked 6 months ago151 views
1 Answer

The error basically indicates that the managed node doesn't have the required permissions to access the specified S3 bucket.


You have already,

  1. Attached necessary IAM permissions to the role attached to the instance

  2. Tested connectivity to S3 using telnet

As far as I can think, the only thing left which would be causing issues with S3 access is the S3 Gateway endpoint policy which must be restrictive. Please verify the endpoint policy and allow access from the nodes.

(-) Steps to edit endpoint policy -

answered 4 months ago
profile picture
reviewed 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions