Managing EC2 and VPC: AWS with Python and Boto3 Series

所在平台: Udemy

课程主页: https://www.udemy.com/course/aws-with-python-and-boto3-managing-ec2-and-vpc/

课程评论:没有评论

第一个写评论        关注课程

课程简介

课程名称:管理 EC2 和 VPC:AWS 使用 Python 和 Boto3 系列 概述:您想学习如何在 AWS 上使用 Python 代码实现 VPC 和 EC2 资源吗?您是否希望使用 Python 代码启动 EC2 实例?如果您正在为 AWS 解决方案架构师助理考试做准备,并希望通过实践提升您在 VPC 和 EC2 方面的理论和技能,那么这个课程正是您需要的!在本课程中,我们将首先了解使用 AWS 资源所需的工具和环境。我们将使用 Python 3,推荐您使用 Jetbrains 的 PyCharm IDE,它有免费的社区版!我会教您如何在 MacOS 和 Windows 上设置您的环境,并创建 AWS 凭证(AWS Access Key 和 AWS Secret Access Key),以便程序化访问 AWS 资源。您将学习如何通过 AWS CLI 在计算机上全局设置 AWS 凭证。在实现之前,我还会提供最后一个技巧,教您如何在 PyCharm IDE 中使用 PyBoto3 实现自动完成功能! 当我们准备好环境后,将开始在 AWS 上实现解决方案!请记住,我们将通过 Python 代码完成所有操作,而不是手动操作!我们将首先创建一个 VPC,并为其提供 CIDR IP 块,以便在该 VPC 内隔离我们的资源。然后,我们将创建两个子网:公有子网和私有子网。公有子网将包括我们的互联网资源,例如公有 EC2 实例,我们一定会在其中启动一个 EC2 实例!为此,我们将创建一个互联网网关(IGW)并将其附加到我们的 VPC。此外,我们将创建一个路由表,用于处理公有子网的互联网路由,并将互联网网关添加到路由表,以允许对公有 EC2 实例的互联网访问。我们还将确保将公有子网与此公有路由表关联,以便能被公有子网及其子资源独占使用。最后,我们将修改公有子网,使其能够自动分配公有 IP 地址给我们在此公有子网上启动的资源。通过这些步骤,我们将能够实现对公有 EC2 实例的双向互联网访问,且所有操作均通过 Python 代码完成! 此外,我们还将创建一个私有子网,以供内部资源(如私有 EC2 实例)使用,该实例仅能通过私有子网或公有子网访问,而不对外开放。为此,我们将把私有子网与默认路由表关联,并且不在此路由表中添加互联网网关,从而基本上不能访问互联网。同时,我们还将确保私有子网不启用自动分配公有 IP 地址(默认情况下是关闭的)。这就是我们如何禁用私有 EC2 实例的互联网流量的方式,所有操作同样使用 Python 代码完成! 在启动公有 EC2 实例之前,我们还将开发一个启动 bash 脚本,该脚本将在我们启动 EC2 实例时自动运行。在此脚本中,我们将首先使用 yum 包管理器更新软件包,以确保获得最新的更新和安全补丁。然后我们将在上面安装一个 HTTP 服务器,并通过启动检查命令确保其正常运行。在准备好 HTTP 服务器后,我们将开发一个简单的 HTML 页面,用作问候语,并将其写入磁盘,以便在访问公有 EC2 实例时提供服务。再次强调,我们完成这些操作时也都使用 Python 代码! 完成 EC2 实例的启动后,我们将学习如何详细描述 AWS 上的 EC2 实例;从其 IP 地址到它们所属的子网。接着,我们将学习如何以多种方式管理 EC2 实例,包括停止、启动和终止 EC2 实例,所有这些操作同样将使用 Python 代码实现!课程中有大量信息、实操练习和经验等着您,所以,别再犹豫了,快来加入这个课程,提升您在 AWS 上使用 Python 和 Boto3 的技能吧!

课程评论(0条)

课程详情

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 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 to use PyCharm from Jetbrains. It has a free community edition even! After Iteach 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. 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 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 as 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 nove on to learn how to describe EC2 Instances on AWS in detailed way; from their IP adresses 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! 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!

课程标签

0人关注该课程

主题相关的课程