First, you need to install boto3 package via pip:
pip install boto3
Then, create a new Python file, let's say aws_setup.py and add the following code:
import boto3
# EC2 instance details
AMI = 'ami-0c55b159cbfafe1f0' # Amazon Linux 2 AMI (HVM), SSD Volume Type
INSTANCE_TYPE = 't2.micro' # Free tier instance