ProvidersAWSOn this pageAWSAll functionality related to Amazon AWS platformLLMs​Bedrock​See a usage example.from langchain.llms.bedrock import BedrockAmazon API Gateway​Amazon API Gateway is a fully managed service that makes it easy for developers to create, publish, maintain, monitor, and secure APIs at any scale. APIs act as the "front door" for applications to access data, business logic, or functionality from your backend services. Using API Gateway, you can create RESTful APIs and WebSocket APIs that enable real-time two-way communication applications. API Gateway supports containerized and serverless workloads, as well as web applications.API Gateway handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management. API Gateway has no minimum fees or startup costs. You pay for the API calls you receive and the amount of data transferred out and, with the API Gateway tiered pricing model, you can reduce your cost as your API usage scales.See a usage example.from langchain.llms import AmazonAPIGatewayapi_url = "https://<api_gateway_id>.execute-api.<region>.amazonaws.com/LATEST/HF"# These are sample parameters for Falcon 40B Instruct Deployed from Amazon SageMaker JumpStartmodel_kwargs = {    "max_new_tokens": 100,    "num_return_sequences": 1,    "top_k": 50,    "top_p": 0.95,    "do_sample": False,    "return_full_text": True,    "temperature": 0.2,}llm = AmazonAPIGateway(api_url=api_url, model_kwargs=model_kwargs)SageMaker Endpoint​Amazon SageMaker is a system that can build, train, and deploy machine learning (ML) models with fully managed infrastructure, tools, and workflows.We use SageMaker to host our model and expose it as the SageMaker Endpoint.See a usage example.from langchain.llms import SagemakerEndpointfrom langchain.llms.sagemaker_endpoint import LLMContentHandlerText Embedding Models​Bedrock​See a usage example.from langchain.embeddings import BedrockEmbeddingsSageMaker Endpoint​See a usage example.from langchain.embeddings import SagemakerEndpointEmbeddingsfrom langchain.llms.sagemaker_endpoint import ContentHandlerBaseDocument loaders​AWS S3 Directory and File​Amazon Simple Storage Service (Amazon S3) is an object storage service.
AWS S3 Directory
AWS S3 BucketsSee a usage example for S3DirectoryLoader.See a usage example for S3FileLoader.from langchain.document_loaders import S3DirectoryLoader, S3FileLoaderMemory​AWS DynamoDB​AWS DynamoDB
is a fully managed NoSQL database service that provides fast and predictable performance with seamless scalability.We have to configure the AWS CLI. We need to install the boto3 library.pip install boto3See a usage example.from langchain.memory import DynamoDBChatMessageHistoryPreviousAnthropicNextGoogleLLMsBedrockAmazon API GatewaySageMaker EndpointText Embedding ModelsBedrockSageMaker EndpointDocument loadersAWS S3 Directory and FileMemoryAWS DynamoDB