import subprocess def handler(event, context): commands = [ 'df -h /tmp' ] for command in commands: output = subprocess.check_output(command.split(' ')) print(f"Running command '{command}':\n{output.decode('ascii')}\n---\n") return { 'statusCode': 200, 'body': 'Hello world' }