O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Managing EC2 and VPC: AWS with Python and Boto3 Series

Video Description

Learn how to implement EC2 and VPC resources on AWS using the Python API: Boto3! Implement your infrastructure with code!

About This Video

  • Learn to implement EC2 and VPC resources on AWS using Python API, Boto3, and launch your own infrastructure on AWS.
  • Learn how to read and code against API documentation.

In Detail

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 will teach you how you can set up your environment on both MacOS and Windows. Once we're ready with our environment setup, we'll start implementing our solution on AWS.Then we will create two subnets; Public and Private.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 a 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 detailed way; from their IP addresses to the subnet which they belong to. Then we'll learn how to 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!

All the code and caption files for this course are available at: https://github.com/PacktPublishing/Managing-EC2-and-VPC-AWS-with-Python-and-Boto3-Series

Downloading the example code for this course: You can download the example code files for all Packt video courses you have purchased from your account at http://www.PacktPub.com. If you purchased this course elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.

Table of Contents

  1. Chapter 1 : Introduction
    1. Introduction 00:01:13
    2. About This Course 00:02:59
    3. What We Will Build In This Course? 00:05:11
    4. What Do You Need For This Course? 00:04:53
  2. Chapter 2 : Preparing The Environment for Development
    1. Section Overview 00:03:43
    2. About Tools and Environment 00:04:30
    3. Create an AWS Account If You Don't Already Have It! 00:09:05
    4. Logging in to AWS Console and A Walkthrough 00:09:13
    5. Let's Create Our AWS Credentials! 00:11:13
  3. Chapter 3 : Windows Environment Setup
    1. Installing Python 3 and Pip 00:02:57
    2. Installing AWS SDK (CLI) 00:04:20
    3. Preparing CLI with AWS Credentials 00:02:57
    4. Installing Boto3 00:01:16
    5. Verifying The Setup 00:02:15
  4. Chapter 4 : MacOS Environment Setup
    1. Installing Python 3 and Pip 00:03:24
    2. Installing AWS SDK (CLI) 00:03:01
    3. Preparing CLI with AWS Credentials 00:02:00
    4. Installing Boto3 00:00:51
    5. Verifying The Setup 00:02:09
  5. Chapter 5 : Virtual Private Cloud (VPC) with Boto3 - Part 1
    1. Section Overview 00:00:44
    2. Scenario: AWS Console Perspective of What We'll Build 00:02:20
    3. Setting Up Our Project with PyCharm IDE 00:09:59
    4. Let's Check Out Boto3 API Docs! 00:01:35
    5. [Tip] Auto-Complete Magic with Pyboto3 on PyCharm IDE! 00:06:15
    6. Creating a Virtual Private Cloud (VPC) 00:08:36
    7. Adding Name Tag To An AWS Resource (VPC) 00:06:36
    8. Create an Internet Gateway (IGW) 00:02:22
    9. Attaching the Internet Gateway to VPC 00:04:37
    10. Section Summary 00:01:58
  6. Chapter 6 : Virtual Private Cloud (VPC) with Boto3 - Part 2
    1. Section Overview 00:01:36
    2. Creating a Public Subnet 00:05:18
    3. Creating a Route Table for Public Routes 00:03:48
    4. Adding IGW Route to Route Table 00:05:41
    5. Associating Public Subnet with Public Route Table 00:05:09
    6. Allowing Auto-Assign Public IP Address on Subnet 00:04:15
    7. Creating a Private Subnet 00:06:17
    8. Section Summary 00:01:57
  7. Chapter 7 : Elastic Compute Cloud (EC2) with Boto3 - Part 1
    1. Section Overview 00:02:35
    2. Scenario: AWS Console Perspective of What We'll Build 00:01:49
    3. Creating a Key Pair 00:09:19
    4. Creating a Security Group 00:05:17
    5. Adding a Rule to Security Group 00:10:36
    6. Creating a Startup Script for EC2 Instance 00:07:21
    7. Launching an EC2 Instance Within Our Public Subnet 00:09:35
    8. Launching an EC2 Instance Within Our Private Subnet 00:07:28
    9. It's Time to Launch the Whole Infrastructure! 00:05:49
    10. Let's Check if Everything is Running on AWS Console! 00:11:49
    11. Connecting to EC2 Instance and Verifying Startup Script Works 00:02:46
    12. Checking Public Access for Private EC2 Instance 00:02:29
    13. Section Summary 00:02:26
  8. Chapter 8 : Elastic Compute Cloud (EC2) with Boto3 - Part 2
    1. Section Overview 00:01:08
    2. Describing EC2 Instance 00:06:49
    3. Modifying EC2 Instance 00:06:48
    4. Stopping EC2 Instance 00:03:44
    5. Starting EC2 Instance 00:03:35
    6. Terminating EC2 Instance 00:03:08
    7. Section Summary 00:01:52
  9. Chapter 9 : Wrapping Up
    1. What Have We Learned? 00:05:30
    2. Thank You! 00:00:22