How to create ec2 instance from boto3
- Refer Here for the documentation.
- Lets create an ubuntu 18 ec2 instance from boto3
- AMI-ID: ami-07a29e5e945228fa1
- Key Value Pair: jenkins
- instancetype: t2.micro
- The code is available in github Refer Here
- Exercises:
- Write a boto3 code to start the ec2 instances and stop the ec2 instances which have a tag environment = ‘DEV’
- Write a code to fetch the size of s3 buckets in mb
