> For the complete documentation index, see [llms.txt](https://docs.arkannis.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.arkannis.net/cloud/aws/vpc/what-is-a-vpc.md).

# What is a VPC

VPC = Virtual Privat Cloud

* This is an instance that can be deployed to a region over multiple availability zones
* It kind of acts like a private network that contains multiple subnets
* The great thing about it is that it is private and secure
* The resources can communicate between subnets but they do not communicate outside of the subnet

<figure><img src="/files/hmqkVdUONJiOqGFUVyfV" alt=""><figcaption></figcaption></figure>

* To be able to serve the app to the internet (let's say it's a webapp) we can add the private subnets `10.0.1.0/24` and `10.0.4.0/24` to a <mark style="color:orange;">`internet gateway`</mark>&#x20;
* The now public subnets with the load balancer resources are reachable from the internet but they are still able to communicate with the other subnets in the VPC

#### Simple infrastructure for a basic secure app:

* Create subnet that is connected to a Internet gateway and has something like Nginx deployed to it
* Create another subnet where you would add the webapps
* Create another subnet where you would add the databases
* Note that all the deployed resources communicate with each other&#x20;

#### So how would traffic go?

* Our internet gateway allows HTTPS connections on port 443 to server `10.0.1.10` which hosts Nginx

Nginx Server --> Forward traffic to webapp --> webapp connects to database, also processes the request and returns data to Nginx --> Nginx servers the result to the end user


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.arkannis.net/cloud/aws/vpc/what-is-a-vpc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
