I wrote python code in lambda for run command from SSM but i had error the error
Response: { "errorMessage": "2019-11-26T10:51:09.649Z d6a9aff6-9da9-477c-82b4-100d96a316fe Task timed out after 3.00 seconds" }
Request ID: "d6a9aff6-9da9-477c-82b4-100d96a316fe"
Function Logs:
START RequestId: d6a9aff6-9da9-477c-82b4-100d96a316fe Version: $LATEST
END RequestId: d6a9aff6-9da9-477c-82b4-100d96a316fe
REPORT RequestId: d6a9aff6-9da9-477c-82b4-100d96a316fe Duration: 3003.16 ms Billed Duration: 3000 ms Memory Size: 128 MB Max Memory Used: 34 MB
2019-11-26T10:51:09.649Z d6a9aff6-9da9-477c-82b4-100d96a316fe Task timed out after 3.00 seconds
the code
from __future__ import print_function
import json
import boto3
import urllib.request
ec2_client = boto3.client('ec2', region_name='us-west-1')
ssm_client = boto3.client('ssm', region_name='us-west-1')
client = boto3.client('ssm')
params={"commands":["mkdir reham1"],"workingDirectory":["/home"],"executionTimeout":["3600"]}
response = ssm_client.send_command(DocumentName="AWS-RunShellScript", InstanceIds="i-0fb28a7b3786adee1",Comment='logging the', TimeoutSeconds=600, Parameters=params)