I am getting error in my below snippet to start a EC2 instance in lambda function with the handler as lambda_function.start_handler
import boto3
region = 'us-east-2'
instances = ['i-04b301372b916390f']
def start_handler(event, context):
ec2 =boto3.client('ec2',region_name=region)
ec2.start_instances(InstanceIds=instances)
print('started your instances: ') +
str(instances)
Getting below error:
Syntax error in module 'lambda_function': unindent does not match any outer indentation level (lambda_function.py, line 8)