This is the error I am getting when I am trying to terminate the instance.
botocore.exceptions.ParamValidationError: Parameter validation failed:
Invalid type for parameter InstanceIds, value: i-0bec2a0bf000bb71c, type: <class 'str'>, valid types: <class 'list'>, <class 'tuple'>
This is the code I am using
import boto3
ec2 = boto3.resource('ec2')
ec2.instances.filter(InstanceIds = 'i-27h087h66ikw').terminate()