June 2018
Intermediate to advanced
398 pages
9h
English
Now, we're ready to create our first virtual machine using boto3. As we have discussed, we need the AMI that we will instantiate an instance from. Think of an AMI as a Python class; creating an instance will create an object from it. We will use the Amazon Linux AMI, which is a special Linux operating system maintained by Amazon and used for deploying Linux machines without any extra charges. You can find a full AMI ID, per region, at https://aws.amazon.com/amazon-linux-ami/:

import boto3ec2 = boto3.resource('ec2')instance = ec2.create_instances(ImageId='ami-824c4ee2', MinCount=1, MaxCount=1, InstanceType='m5.xlarge' ...
Read now
Unlock full access