Skip to content

Instantly share code, notes, and snippets.

View okram999's full-sized avatar

Niris Okram okram999

View GitHub Profile
@okram999
okram999 / gist:49d6d90edb6b2c696a82ec75cfd2cbb7
Last active June 2, 2026 16:24
multi provider genai gateway test
"""
GenAI Gateway — End-User Quickstart
=====================================
This script shows how to use the Multi-Provider GenAI Gateway from your Python code.
Built on AWS with LiteLLM — routes to Bedrock models, self-hosted models, and more.
SETUP
-----
1. Get your API key from the LiteLLM UI:
@okram999
okram999 / gist:48226e6311c434a9c752f0f9a026ae51
Created November 21, 2025 19:43
sample file for referece
providers: []
managedActiveDirectories:
- name: AcceleratorManagedActiveDirectory
type: AWS Managed Microsoft AD
account: niris-ct-network3
region: us-east-1
dnsName: example.local
netBiosDomainName: example
description: Example managed active directory
import os
from langchain.document_loaders import TextLoader
from langchain.text_splitter import CharacterTextSplitter
from langchain.embeddings.openai import OpenAIEmbeddings
from langchain.vectorstores import Pinecone
import pinecone
from langchain import VectorDBQA, OpenAI
import boto3
client = boto3.client('iam')
def isPasswordEnabled(username):
iam = boto3.resource('iam')
login_profile = iam.LoginProfile(username)
try:
login_profile.create_date
return True
@okram999
okram999 / debug.py
Last active December 2, 2020 05:10
debug.py
import boto3
import logging
import sys
SESSION = boto3.session.Session()
CFT = SESSION.client('cloudformation')
LOGGER = logging.getLogger()
LOGGER.setLevel(logging.INFO)
@okram999
okram999 / networking-screenshot
Last active March 31, 2020 01:44
networking-screenshot
We couldn’t find that file to show.
@okram999
okram999 / landingZone.md
Last active December 24, 2019 21:59
landingZone

Landing Zone Architecture:

image

image

Account Vending Machine:

@okram999
okram999 / Some home work
Last active January 5, 2020 05:16
Some home work
https://aws.amazon.com/premiumsupport/knowledge-center/configure-vpn-backup-dx/
Lambda @Edge
# For Public VIF:
Customer can control the route propagation to AWS using the community tags:
7224:9100 - local
7224:9200 - continent
7224:9300 - Global
Customer can filter AWS routes
@okram999
okram999 / Advance Networking.md
Last active December 11, 2019 16:45
Advance Networking

What are the technical requirements for virtual interfaces to public AWS services such as Amazon EC2 and Amazon S3?

  • A public or private ASN. If you are using a public ASN, you must own it. If you are using a private ASN, it must be in the 64512 to 65535 range.
  • A new unused VLAN tag that you select
  • Public IPs (/30) allocated by you for the BGP session
* VLAN are in customer's DC
* VIF are in AWS VPC