- Ansible 2 Cloud Automation Cookbook
- Aditya Patawari Vikas Aggarwal
- 262字
- 2021-06-24 18:43:37
Creating and managing a VPC
Virtual Private Cloud, or VPC, is technically not a part of EC2. However, this is usually the first step when getting started with EC2. VPC creates a virtual network which logically isolates our resources. This improves security and management since, logically, subnet and gateway are dedicated for our resources only. A common usage of VPC is to isolate public-facing services (like load balancers or instances running public services) and servers storing data (like databases) which do not require direct access from the wider internet.

Technically, a VPC has several moving parts, as depicted in the preceding image. Even a simple architecture would consist of the following components:
- The VPC itself, where we will allocate a high-level Classless InterDomain Routing (CIDR) block and choose a region.
- A public subnet, which will use a chunk of CIDR from the larger CIDR that we defined above.
- A private subnet, which will use a chunk of CIDR from the larger CIDR that we defined above.
- An Internet Gateway, which will be attached to the public subnet. This gateway will route the traffic to the public internet.
- A NAT Gateway, which will be attached to the private subnet. This gateway will provide Network Address Translation (NAT) services to outbound traffic for the private subnet.
- A route table attaching the Internet Gateway with the public subnet.
- A route table attaching the NAT Gateway with the private subnet.
Now that we have broken down the list of components that we need to build a VPC, let us start writing Ansible code for the same.
- 后稀缺:自動(dòng)化與未來(lái)工作
- 大數(shù)據(jù)技術(shù)與應(yīng)用基礎(chǔ)
- 工業(yè)機(jī)器人產(chǎn)品應(yīng)用實(shí)戰(zhàn)
- 手把手教你學(xué)AutoCAD 2010
- Dreamweaver 8中文版商業(yè)案例精粹
- CompTIA Network+ Certification Guide
- 數(shù)據(jù)庫(kù)系統(tǒng)原理及應(yīng)用教程(第5版)
- MCGS嵌入版組態(tài)軟件應(yīng)用教程
- Artificial Intelligence By Example
- Dreamweaver+Photoshop+Flash+Fireworks網(wǎng)站建設(shè)與網(wǎng)頁(yè)設(shè)計(jì)完全實(shí)用
- 傳感器原理與工程應(yīng)用
- Instant Slic3r
- AVR單片機(jī)C語(yǔ)言程序設(shè)計(jì)實(shí)例精粹
- Hands-On Artificial Intelligence for Beginners
- Ubuntu 9 Linux應(yīng)用基礎(chǔ)