Managing EC2 and VPC: AWS with Python and Boto3 Series

Learn how to implement EC2 and VPC resources on AWS using Python API and Boto3.

Managing EC2 and VPC: AWS with Python and Boto3 Series

Learn how to implement EC2 and VPC resources on AWS using Python API and Boto3.
37
views
Share the link to this page
Copied

About the Class

Do you want to learn how to implement VPC and EC2 resources with Python code on AWS? Do you want to launch EC2 Instances with Python code on AWS? Are you preparing for the AWS Solutions Architect Associate Exam and want to put your theory and skills into practice with VPC and EC2? This is the course for you.

In this course, we’ll start by taking a look at the tools and the environment that we need to work with AWS resources. We’ll be using Python 3 and as per the IDE I recommend you use PyCharm from Jetbrains. It has a free community edition even.

After I teach you how you can set up your environment on both macOS and Windows, we’ll create our credentials for AWS as being the AWS Access Key and AWS Secret Access Key for programmatic access to AWS resources. You’ll learn how you can set your AWS credentials globally on your computers using AWS CLI. Before jumping into the implementation, for one last tip, I’ll show you how you can have auto-complete capabilities on your PyCharm IDE with PyBoto3.

Once we’re ready with our environment setup, we’ll start implementing our solution on AWS. And remember we’ll do everything with Python code; not a single thing manually or by hand. We’ll start by creating a VPC. For our own VPC, we’ll provide CIDR IP block to isolate our resources within that VPC.

Then we will create two subnets; Public and Private. The public subnet will be where we will put our internet-facing resources like public EC2 instances and we will definitely launch an EC2 instance in it. To achieve this, we will create an internet gateway or IGW and attach it to our VPC. But of course, that is not enough. We will create a route table for public routes over the internet and also add our internet gateway to the route table to allow internet access to our public EC2 instance. We will also not forget to associate our public subnet with this public route table so it can be exclusively used by the public subnet and its subresources. And finally, we will modify our public subnet so it can automatically assign public IP addresses to the resources we will launch within this public subnet. That's the way we are going to achieve internet access to and from our public EC2 instance and again we will do all of that with our Python code.

Besides, we will create a private subnet for our internal resources like a private EC2 instance which will only be accessible through the private or public subnet; not open to the world. To achieve this, we will associate our default route table with our private subnet and then we will not add our internet gateway to this route table so it will basically not have any internet access. We will also not enable auto-assign public IP addresses on private subnet which is disabled by default. That's basically how we are going to disable internet traffic on our private EC2 instance again we will do all this with our Python code.

We will not stop there of course so before we launch our public EC2 instance, we will develop a startup bash script to automatically run when we launch our EC2 instance. In this script, we will first update our packages with yum package manager so we can stay up-to-date with the latest updates and security patches. Then we will install an HTTP server on it and make sure it's working by a startup check command. After we prepare our HTTP server, we will develop a simple HTML page as a greeting and we will write this page to disk to be served when we try to access our public EC2 instance. And remember, we will again do all of this with our Python code.

After finishing up launching our EC2 instances, we'll move on to learn how to describe EC2 instances on AWS in a detailed way; from their IP addresses to the subnet which they belong to. Then we'll learn how to manage EC2 instances in various ways. We'll stop, start and terminate EC2 instances and again the best part is we will do all of that with our Python code.

Lots of information, hands-on practice, and experience is waiting for you in this course on AWS. So, don't miss any more time and join me in this course to sharpen your skills on AWS using Python and Boto3.

Author

Niyazi Erdogan

AWS Certified Solutions Architect, Software Engineer
Hi, I'm Niyazi Erdoğan. I'm a software engineer and AWS Certified Solutions Architect with over ten years of experience in various fields. I'm living in one of the most beautiful cities in the world, Istanbul. I'm a self-taught programmer and I've been programming since I was in middle-school. My experience ranges from embedded development to...

School

Niyazi Erdogan's School

Requirements

  • You should have knowledge of Python at beginner level
  • You should have any Python Interpreter (default is fine but I recommend PyCharm)
  • You should have an AWS account (free tier available)

Class Contents

One-time Fee
$20
List Price:  $50
You save:  $30
€18.79
List Price:  €46.99
You save:  €28.19
£16.05
List Price:  £40.14
You save:  £24.08
CA$27.61
List Price:  CA$69.04
You save:  CA$41.42
A$31.15
List Price:  A$77.88
You save:  A$46.72
S$27.25
List Price:  S$68.13
You save:  S$40.88
HK$156.61
List Price:  HK$391.53
You save:  HK$234.91
CHF 18.23
List Price:  CHF 45.57
You save:  CHF 27.34
NOK kr219.70
List Price:  NOK kr549.25
You save:  NOK kr329.55
DKK kr140.25
List Price:  DKK kr350.64
You save:  DKK kr210.38
NZ$33.84
List Price:  NZ$84.62
You save:  NZ$50.77
د.إ73.44
List Price:  د.إ183.62
You save:  د.إ110.17
৳2,195.79
List Price:  ৳5,489.49
You save:  ৳3,293.69
₹1,673.19
List Price:  ₹4,182.97
You save:  ₹2,509.78
RM95.83
List Price:  RM239.57
You save:  RM143.74
₦24,023.33
List Price:  ₦60,058.33
You save:  ₦36,035
₨5,567.25
List Price:  ₨13,918.13
You save:  ₨8,350.88
฿736.45
List Price:  ฿1,841.12
You save:  ฿1,104.67
₺650.37
List Price:  ₺1,625.94
You save:  ₺975.56
B$105.73
List Price:  B$264.33
You save:  B$158.59
R380.62
List Price:  R951.55
You save:  R570.93
Лв36.75
List Price:  Лв91.89
You save:  Лв55.13
₩27,653.92
List Price:  ₩69,134.81
You save:  ₩41,480.88
₪75.28
List Price:  ₪188.20
You save:  ₪112.92
₱1,144.60
List Price:  ₱2,861.52
You save:  ₱1,716.91
¥3,092.55
List Price:  ¥7,731.37
You save:  ¥4,638.82
MX$339.71
List Price:  MX$849.28
You save:  MX$509.57
QR72.99
List Price:  QR182.49
You save:  QR109.49
P276.54
List Price:  P691.35
You save:  P414.81
KSh2,650
List Price:  KSh6,625
You save:  KSh3,975
E£975.91
List Price:  E£2,439.78
You save:  E£1,463.86
ብር1,138.44
List Price:  ብር2,846.12
You save:  ብር1,707.67
Kz16,750
List Price:  Kz41,875
You save:  Kz25,125
CLP$19,609.20
List Price:  CLP$49,023
You save:  CLP$29,413.80
CN¥144.77
List Price:  CN¥361.93
You save:  CN¥217.15
RD$1,182.08
List Price:  RD$2,955.20
You save:  RD$1,773.12
DA2,695.37
List Price:  DA6,738.43
You save:  DA4,043.05
FJ$45.50
List Price:  FJ$113.76
You save:  FJ$68.26
Q155.61
List Price:  Q389.04
You save:  Q233.42
GY$4,189.19
List Price:  GY$10,472.97
You save:  GY$6,283.78
ISK kr2,829.20
List Price:  ISK kr7,073
You save:  ISK kr4,243.80
DH203.50
List Price:  DH508.75
You save:  DH305.25
L357.40
List Price:  L893.50
You save:  L536.10
ден1,156.58
List Price:  ден2,891.45
You save:  ден1,734.87
MOP$161.40
List Price:  MOP$403.50
You save:  MOP$242.10
N$380.40
List Price:  N$951
You save:  N$570.60
C$736.42
List Price:  C$1,841.06
You save:  C$1,104.64
रु2,676.72
List Price:  रु6,691.80
You save:  रु4,015.08
S/74.79
List Price:  S/186.98
You save:  S/112.19
K75.76
List Price:  K189.42
You save:  K113.65
SAR75.02
List Price:  SAR187.55
You save:  SAR112.53
ZK501.70
List Price:  ZK1,254.25
You save:  ZK752.55
L93.52
List Price:  L233.82
You save:  L140.29
Kč474.03
List Price:  Kč1,185.08
You save:  Kč711.05
Ft7,380.37
List Price:  Ft18,450.92
You save:  Ft11,070.55
SEK kr218.94
List Price:  SEK kr547.36
You save:  SEK kr328.41
ARS$17,374.92
List Price:  ARS$43,437.30
You save:  ARS$26,062.38
Bs138.74
List Price:  Bs346.87
You save:  Bs208.12
COP$78,168.34
List Price:  COP$195,420.86
You save:  COP$117,252.51
₡10,020.75
List Price:  ₡25,051.89
You save:  ₡15,031.13
L493.95
List Price:  L1,234.89
You save:  L740.93
₲148,166.45
List Price:  ₲370,416.12
You save:  ₲222,249.67
$U778.03
List Price:  $U1,945.08
You save:  $U1,167.05
zł81.77
List Price:  zł204.44
You save:  zł122.66

What's Included

Language: English
Level: All levels
Skills: Subnets, VPCs, AWS, EC2 Instances, Boto3, Python, EC2
Age groups: All ages
Duration: 4 hours 31 minutes
59 Videos
24 Documents
0
Saves
37
Views
This class has not been saved

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.