> For the complete documentation index, see [llms.txt](https://docs.openg2p.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openg2p.org/1.2/deployment/deployment-guide/make-environment-publicly-accessible-using-aws-lb-configuration.md).

# Make Environment Publicly Accessible using AWS LB Configuration

For internal use

## Introduction

This document provides step-by-step instructions to make environment publicly accessible without wire guard configuration. Generally, all environments are privately accessible using wire guard configuration.

**Note**

The naming conventions may vary depending on the environment.

## **Create a new Target Groups and LB on AWS**

The steps below outline the process for creating new Target Groups and Load Balancers (LB) on AWS.

* Creating Target Group for **external-http**
* Creating Target Group for **external-httpsredirect**
* Creating a Target Group for **PostgreSQL**
* Creating external network **Load Balancer**

### Creating Target Group for **external-http**

1. Choose a target type - `IP addresses`
2. Target Group name - `openg2p-<envname>-external-http`
3. Protocol : Port  -  `TCP : 30080`
4. VPC  - `general-vpc`
5. Health check protocol : Path : Port (**Traffic Port**)- `HTTP : /healthz/ready : 30521`
6. Next, navigate to "Register Targets", verify the network settings, add the internal IP addresses of the cluster instances, and create the target group.<br>

### Creating Target Group for **external-httpsredirect**

1. Choose a target type - `IP addresses`
2. Target Group name - `openg2p-<envname>-ext-httpsredirect`
3. Protocol : Port  -  `TCP : 30081`
4. VPC  - `general-vpc`
5. Health check protocol : Path : Port (**Overide**) - `HTTP : /healthz/ready : 30521`
6. Next, navigate to "Register Targets", verify the network settings, add the internal IP addresses of the cluster instances, and create the target group.

### Creating Target Group for PostgreSQL

For PostgreSQL, there is no need to create a Target Group (TG). Instead, create a record with the name internal.sandbox-name and map the Internal NLB DNS name of the environment to it.<br>

### Creating external n**etwork Load Balancer**

1. Create NLB with name - `openg2p-<envname>-external`
2. Select VPC -`general-vpc`  do map for `ap-south-1a, 1b, 1c`
3. Select Security Group - `default-nginx-node`&#x20;
4. Listeners and routing **Protocol : Port : Default action**&#x20;
   * `TLS : 443 :  openg2p-<envname>-external-http`
   * `TCP : 80 : openg2p-<envname>-ext-httpsredirect`
5. Select an `ACM certificate` corresponding to the environment's domain name and create an NLB.
6. Make sure the Load balancer created and active.
7. Map the Load Balancer DNS name to your environment domain name on Route 53.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openg2p.org/1.2/deployment/deployment-guide/make-environment-publicly-accessible-using-aws-lb-configuration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
