in EC2 Auto Clean Room Forensics/Lambda-Functions/isSSMInstalled.py [0:0]
def lambda_handler(event, context):
# Validates whetehr SSM is installed or not
response = ssmclient.describe_instance_information()
print (response)
isSSMInstalled = False
for item in response['InstanceInformationList']:
if item['InstanceId'] == event['ForensicInstanceId']:
isSSMInstalled = True
event['SSM_STATUS'] = 'SUCCEEDED'
event['stauscheck'] = 1
return event