Using Console
Using CLI
<vpc-id>
with the ID of the VPC that you want to use.<security-group-id>
with the ID of the security group that you created in step 4.<instance-id>
with the ID of your EC2 instance.Using Python
run_instances
method of the EC2 client to launch a new instance. Make sure to specify the correct VPC ID and subnet ID in the NetworkInterfaces
parameter.terminate_instances
method of the EC2 client to terminate an instance.