Skip to content

Instantly share code, notes, and snippets.

View okram999's full-sized avatar

Niris Okram okram999

View GitHub Profile
@okram999
okram999 / notes.md
Last active November 7, 2026 22:25
Bedrock Agentcore - 5-2. Long-Term Memory (LTM)

Fixes: Agentic AI on AWS workshop, chapters 05 (LTM) and 06 (Runtime)

Workshop: Agentic AI on AWS (Strands SDK & Bedrock AgentCore), repo aws-samples/sample-aws-agentic-ai-workshop Tested: Nov 7, 2026 · us-west-2 · Code Server environment · us.anthropic.claude-sonnet-4-6

TL;DR

# Where Fix
1 Ch 05, lab 5-2 Upgrade bedrock-agentcore 1.2.1 → 1.25.4
2 Ch 05, lab 5-2 Lower relevance_score 0.5 → 0.3
@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