Created
July 7, 2022 21:17
-
-
Save KinzP/b29f44ef903582afa6a68c5f16982ef0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
ec2 = boto3.resource('ec2') | |
no_of_instances = int(input("How many instances:" )) | |
instance = ec2.create_instances( | |
ImageId="ami-0cff7528ff583bf9a", #input AMI here | |
InstanceType='t2.micro', | |
KeyName='LUIT_Project14', #input keypair name here | |
MaxCount= 3, | |
MinCount= 3 | |
) | |
print(instance) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment