I am trying to create an EC2 instance using boto3 but getting an error message.
import boto3, botocore
aws_mag_con_aswapi=boto3.session.Session(profile_name="aswapi")
ec2 = boto3.client('ec2')
responce = ec2.create_instances(
ImageId = 'ami-009d6802948d06e52',
MinCount = 1,
MaxCount = 1,
InstanceType = 't2.micro',
KeyName = 'nabarupa',
SubnetId = '')
print (responce[0].id)