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.
40
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
€19.19
List Price:  €47.99
You save:  €28.79
£15.96
List Price:  £39.90
You save:  £23.94
CA$27.96
List Price:  CA$69.91
You save:  CA$41.95
A$30.75
List Price:  A$76.88
You save:  A$46.13
S$26.93
List Price:  S$67.33
You save:  S$40.39
HK$155.68
List Price:  HK$389.22
You save:  HK$233.53
CHF 17.87
List Price:  CHF 44.67
You save:  CHF 26.80
NOK kr221.45
List Price:  NOK kr553.63
You save:  NOK kr332.17
DKK kr143.16
List Price:  DKK kr357.91
You save:  DKK kr214.74
NZ$34.27
List Price:  NZ$85.69
You save:  NZ$51.41
د.إ73.46
List Price:  د.إ183.65
You save:  د.إ110.19
৳2,389.36
List Price:  ৳5,973.41
You save:  ৳3,584.04
₹1,688.76
List Price:  ₹4,221.91
You save:  ₹2,533.15
RM89.36
List Price:  RM223.40
You save:  RM134.04
₦33,857.66
List Price:  ₦84,644.15
You save:  ₦50,786.49
₨5,556
List Price:  ₨13,890
You save:  ₨8,334
฿689.32
List Price:  ฿1,723.30
You save:  ฿1,033.98
₺691.05
List Price:  ₺1,727.62
You save:  ₺1,036.57
B$116.02
List Price:  B$290.05
You save:  B$174.03
R362.30
List Price:  R905.76
You save:  R543.45
Лв37.54
List Price:  Лв93.85
You save:  Лв56.31
₩28,090.20
List Price:  ₩70,225.50
You save:  ₩42,135.30
₪74.04
List Price:  ₪185.10
You save:  ₪111.06
₱1,178.78
List Price:  ₱2,946.95
You save:  ₱1,768.17
¥3,095.40
List Price:  ¥7,738.50
You save:  ¥4,643.10
MX$408.57
List Price:  MX$1,021.42
You save:  MX$612.85
QR72.92
List Price:  QR182.30
You save:  QR109.38
P273.44
List Price:  P683.60
You save:  P410.16
KSh2,589.37
List Price:  KSh6,473.43
You save:  KSh3,884.06
E£993
List Price:  E£2,482.50
You save:  E£1,489.50
ብር2,447.77
List Price:  ብር6,119.44
You save:  ብር3,671.66
Kz18,260
List Price:  Kz45,650
You save:  Kz27,390
CLP$19,733.60
List Price:  CLP$49,334
You save:  CLP$29,600.40
CN¥144.86
List Price:  CN¥362.15
You save:  CN¥217.29
RD$1,205.04
List Price:  RD$3,012.62
You save:  RD$1,807.57
DA2,685.50
List Price:  DA6,713.75
You save:  DA4,028.25
FJ$45.51
List Price:  FJ$113.79
You save:  FJ$68.27
Q154.34
List Price:  Q385.86
You save:  Q231.51
GY$4,183.11
List Price:  GY$10,457.79
You save:  GY$6,274.67
ISK kr2,793.60
List Price:  ISK kr6,984
You save:  ISK kr4,190.40
DH201.14
List Price:  DH502.86
You save:  DH301.72
L364.43
List Price:  L911.08
You save:  L546.64
ден1,180.95
List Price:  ден2,952.39
You save:  ден1,771.43
MOP$160.31
List Price:  MOP$400.78
You save:  MOP$240.46
N$362.60
List Price:  N$906.50
You save:  N$543.90
C$735.73
List Price:  C$1,839.33
You save:  C$1,103.60
रु2,700.32
List Price:  रु6,750.80
You save:  रु4,050.48
S/75.81
List Price:  S/189.54
You save:  S/113.72
K80.50
List Price:  K201.25
You save:  K120.75
SAR75.08
List Price:  SAR187.72
You save:  SAR112.63
ZK552.91
List Price:  ZK1,382.28
You save:  ZK829.37
L95.56
List Price:  L238.91
You save:  L143.34
Kč486.52
List Price:  Kč1,216.31
You save:  Kč729.78
Ft7,900
List Price:  Ft19,750
You save:  Ft11,850
SEK kr220.72
List Price:  SEK kr551.81
You save:  SEK kr331.08
ARS$20,076.99
List Price:  ARS$50,192.48
You save:  ARS$30,115.49
Bs138.16
List Price:  Bs345.41
You save:  Bs207.24
COP$87,794.99
List Price:  COP$219,487.49
You save:  COP$131,692.49
₡10,184.74
List Price:  ₡25,461.86
You save:  ₡15,277.11
L505.28
List Price:  L1,263.20
You save:  L757.92
₲156,093.40
List Price:  ₲390,233.51
You save:  ₲234,140.10
$U852.45
List Price:  $U2,131.12
You save:  $U1,278.67
zł83.27
List Price:  zł208.17
You save:  zł124.90

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
40
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.