Skip to main content

Overview

To add a live AgentOS instance to os.agno.com, the endpoint must be HTTPS. Here is how you can add a custom domain and HTTPS to your AWS loadbalancer.

Use a custom domain

  1. Register your domain with Route 53.
  2. Point the domain to the loadbalancer DNS.

Custom domain for your AgentOS App

Create a record in the Route53 console to point app.[YOUR_DOMAIN] to the AgentOS endpoint. llm-app-aidev-run You can visit the app at [http://app.[YOUR_DOMAIN]
Note the http in the domain name.

Add HTTPS

To add HTTPS:
  1. Create a certificate using AWS ACM. Request a certificat for *.[YOUR_DOMAIN]
llm-app-request-cert
  1. Creating records in Route 53.
llm-app-validate-cert
  1. Add the certificate ARN to Apps
Make sure the certificate is Issued before adding it to your Apps
Update the infra/prd_resources.py file and add the load_balancer_certificate_arn to the FastAPI app.
infra/prd_resources.py

# -*- FastAPI running on ECS
prd_fastapi = FastApi(
    ...
    # To enable HTTPS, create an ACM certificate and add the ARN below:
    load_balancer_enable_https=True,
    load_balancer_certificate_arn="arn:aws:acm:us-east-1:497891874516:certificate/6598c24a-d4fc-4f17-8ee0-0d3906eb705f",
    ...
)
  1. Create new Loadbalancer Listeners
Create new listeners for the loadbalancer to pickup the HTTPs configuration.
ag infra up --env prd --infra aws --name listener
The certificate should be Issued before applying it.
After this, https should be working on your custom domain.
  1. Update existing listeners to redirect HTTP to HTTPS
ag infra patch --env prd --infra aws --name listener
After this, all HTTP requests should redirect to HTTPS automatically.