This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """ | |
| 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: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "public_identifier": "okramniristotle", | |
| "profile_pic_url": "https://s3.us-west-000.backblazeb2.com/proxycurl/person/okramniristotle/profile?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=0004d7f56a0400b0000000001%2F20230720%2Fus-west-000%2Fs3%2Faws4_request&X-Amz-Date=20230720T160137Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=ad19b9e78398b6d6b4cecde342fa1a94515ed24cd6ff077eb4dcdae7ed8ac9dd", | |
| "background_cover_image_url": null, | |
| "first_name": "Niris", | |
| "last_name": "Okram", | |
| "full_name": "Niris Okram", | |
| "follower_count": null, | |
| "occupation": "Sr Solutions Architect at Amazon Web Services (AWS)", | |
| "headline": "Sr. Solutions Architect at Amazon Web Services (AWS) | AWS Certified x 8", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import boto3 | |
| import logging | |
| import sys | |
| SESSION = boto3.session.Session() | |
| CFT = SESSION.client('cloudformation') | |
| LOGGER = logging.getLogger() | |
| LOGGER.setLevel(logging.INFO) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| https://aws.amazon.com/premiumsupport/knowledge-center/configure-vpn-backup-dx/ | |
| Lambda @Edge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # 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 |
NewerOlder

