Skip to main content

Posts

Manage AWS EC2 Instances using Python Boto3 script

Hey Welcome! back to Automations with Python for AWS!!  Now IT market says AWS is the top number one Cloud Computing platform. That is why I've selected this AWS automations using Python Boto3. In this post we will be exploring the AWS EC2 Instance related operations, and manage them in a reusable form. Create EC2 instance using Python Boto3 Launch AWS EC2 instance using Python Boto3 script Stop AWS EC2 instance using Python Boto3 script Start AWS EC2 Instance using Python Boto3 script Terminate AWS EC2 instance using Python Boto3 script Fetching Public IP of given instance-id How do you Create EC2 instance using Python3 Boto3?   Creating EC2 instance using Boto3 Python code #============================================= # File : create_ec2.py # Description: Create EC2 instance by Boto3 import boto3 ec2 = boto3.resource('ec2') instances = ec2.create_instances( ImageId="ami-0dafa01c8100180f8", MinCount=1, MaxCount=1, Inst...