You have created a lambda function coded using python. While running you receive errors like

Error#1: Syntax error in module ‘lambda_function’: unexpected indent (lambda_function.py, line 5)

or

Error#2: Syntax error in module ‘lambda_function’: expected an indented block (lambda_function.py, line 5)

or

Error#3: Syntax error in module ‘lambda_function’: ‘return’ outside function (lambda_function.py, line 15)

All these errors due to improper formatting of the python code. Python uses spacing at the start of the line to determine when code blocks start and end. Use a Python syntax aware editor to correct it.
 
The below sample code shows the right indentation to avoid the above errors-

import boto3
def lambda_handler(event, context):
    s3 = boto3.client("s3")
    if event:
        print ("Event : ", event)
        file_obj=event["Records"][0]
        print (file_obj)
        file_name = str(file_obj['s3']['object']['key'])
        print ("Filename : ",file_name)
        fileObj = s3.get_object(Bucket = "myblaug", Key = file_name)
        print (fileObj)
        file_content = fileObj["Body"].read().decode('utf-8')
        print (file_content)
    
    return 'Hello from Lambda'