Skip to content

Commit 9a849cf

Browse files
authored
Create create_ec2.py
1 parent 5981725 commit 9a849cf

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

create_ec2.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import boto3
2+
3+
ec2 = boto3.resource(
4+
service_name='ec2',
5+
region_name='us-west-2'
6+
)
7+
instances = ec2.create_instances(
8+
ImageId='ami-07e276df524150',
9+
InstanceType='t2.micro',
10+
KeyName='dummy-key',
11+
MinCount=1,
12+
MaxCount=1
13+
)

0 commit comments

Comments
 (0)