Skip to main content
Prerequisites:
  • Complete deployment via SAM (see Setup documentation)
  • API Gateway URL from deployment outputs
  • Python 3.11+ installed locally

Configure the Frontend

Before starting the server, you need to update the frontend files with your API Gateway URL from the SAM deployment outputs.
1

Locate your API URL

After running sam deploy, the outputs will display your API Gateway URL:
Outputs
-------
ApiUrl        = https://XXXXXXXX.execute-api.us-west-2.amazonaws.com/prod
AgentEndpoint = https://XXXXXXXX.execute-api.us-west-2.amazonaws.com/prod/agent
Copy the ApiUrl value for the next step.
2

Update index.html

Open frontend/index.html in your editor and locate line ~837:
const API_BASE_URL = "https://XXXXXXXX.execute-api.us-west-2.amazonaws.com/prod";
Replace the URL with your actual API Gateway URL.
The URL must end with /prod — do not add additional paths.
3

Update avp-agent.html

Open frontend/avp-agent.html and locate line ~237:
const API_BASE = "https://XXXXXXXX.execute-api.us-west-2.amazonaws.com/prod";
Replace with the same API Gateway URL.

Start the Local Server

The demo uses Python’s built-in HTTP server to serve the frontend files.
1

Navigate to frontend directory

cd avp-demo/frontend
2

Start the HTTP server

python3 -m http.server 8000
You should see output similar to:
Serving HTTP on 0.0.0.0 port 8000 (http://0.0.0.0:8000/) ...

Access the Demo Interfaces

With the server running, open your browser to access the different demo interfaces:

Main Demo

Primary AVP authorization demo with interactive UI

AI Agent

Natural language queries with AI-powered AVP access checks

Demo Interface URLs

URLDescriptionRequirements
http://localhost:8000/index.htmlMain AVP labPolicy Store ID
http://localhost:8000/avp-agent.htmlAI agent with natural languageAnthropic API Key in SAM deployment
Do not open files with file:// protocolThe browser will block API calls due to CORS restrictions. Always use http://localhost:8000 to access the demo.

Initial Configuration

When you first open the main demo interface:
1

Enter Policy Store ID

In the configuration section at the top of the page, enter your AWS Verified Permissions Policy Store ID.You can find this ID in the AWS Console under Verified Permissions > Your Policy Store.
2

Verify connection

The configuration status indicator should show a connection to your backend API.

Troubleshooting

Make sure you’re accessing the demo via http://localhost:8000 and not opening files directly with file:// protocol. The browser blocks cross-origin requests from local file URLs.
Verify that:
  • Your API Gateway URL is correctly configured in both HTML files
  • The URL ends with /prod without additional paths
  • Your Lambda functions are deployed and accessible
Test the API directly:
curl https://YOUR-API-URL/prod/users
If port 8000 is occupied, use a different port:
python3 -m http.server 3333
Then access the demo at http://localhost:3333/index.html
The AI agent requires:
  • A valid Anthropic API Key configured during SAM deployment
  • The API Key must have available credits (minimum $5)
  • If you used placeholder during deployment, the agent will not work
Redeploy with a valid API Key:
sam deploy --parameter-overrides AnthropicApiKey=sk-ant-your-key

Next Steps

Demo Scenarios

Follow the 5-act demo flow to explore Zero Trust, Cedar policies, ABAC, and forbid precedence

Build docs developers (and LLMs) love