Skip to content

Latest commit

 

History

History
144 lines (90 loc) · 8.85 KB

File metadata and controls

144 lines (90 loc) · 8.85 KB

aws-llama-index-data-loader


Stability: Experimental

All classes are under active development and subject to non-backward compatible changes or removal in any future version. These are not subject to the Semantic Versioning model. This means that while you may use them, you may need to update your source code when upgrading to a newer version of this package.


Table of contents

Credits

Thanks to @jtlew for the initial insight for the need on this construct.

Overview

This construct provides a Amazon Elastic Cluster Service using Llamaindex Data Loaders with default properties here.

Here is a minimal deployable pattern definition:

TypeScript

import { Construct } from 'constructs';
import { Stack, StackProps, Aws } from 'aws-cdk-lib';
import { LlamaIndexDataLoader } from '@cdklabs/generative-ai-cdk-constructs';

const dataLoader = new LlamaIndexDataLoader(this, 'LlamaIndexDataLoader', {});

Python

from constructs import Construct
from cdklabs.generative_ai_cdk_constructs import LlamaIndexDataLoader

data_loader = LlamaIndexDataLoader(self, 'LlamaIndexDataLoader', )

Initializer

new LlamaIndexDataLoader(scope: Construct, id: string, props: LlamaIndexDataLoaderProps)

Parameters

  • scope Construct
  • id string
  • props LlamaIndexDataLoaderProps

Pattern Construct Props

Name Type Required Description
dockerImageAssetDirectory string Optional A path to a directory to build a DockerImageAsset. NOTE: Currently the platform is fixed to Platform.LINUX_AMD64 with the runtime platform to match with CpuArchitecture.X86_64 and OperatingSystemFamily.LINUX for the running Fargate ECS
memoryLimitMiB number Optional The memory configuration for the container, should be a valid Memory defined AWS::ECS::TaskDefinition
containerLoggingLevel string Optional The python logging level for the ECS tasks
outputBucket Bucket Optional The output bucket. If not passed in one will be created automatically
vpc IVpc Optional The VPC to use. If not passed in, the QueueProcessingFargateService automatically created one will be used

Pattern Properties

Name Type Description
outputBucket Bucket The S3 Bucket for the output.
queueProcessingFargateService QueueProcessingFargateService The ECS Fargate and components assocated with the ECS pattern.

Methods

N/A

Default properties

Out-of-the-box implementation of the construct without any override will set the following defaults:

DockerImageAssetDirectory

This repositories source default path

MemoryLimitMiB

2048

ContainerLoggingLevel

'WARNING'

Architecture

Architecture Diagram

Cost

You are responsible for the cost of the AWS services used while running this construct.

We recommend creating a budget through AWS Cost Explorer to help manage costs. Prices are subject to change. For full details, refer to the pricing webpage for each AWS service used in this solution:

Security

When you build systems on AWS infrastructure, security responsibilities are shared between you and AWS. This shared responsibility model reduces your operational burden because AWS operates, manages, and controls the components including the host operating system, virtualization layer, and physical security of the facilities in which the services operate. For more information about AWS security, visit AWS Cloud Security.

Optionnaly, you can provide existing resources to the constructs (marked optional in the construct pattern props). If you chose to do so, please refer to the official documentation on best practices to secure each service:

  • Amazon S3

Supported AWS Regions

This solution depends uses the Amazon OpenSearch Serverless and Amazon CloudWatch services, which are not currently available in all AWS Regions. You must launch this construct in an AWS Region where these services are available. For the most current availability of AWS services by Region, see the AWS Regional Services List.

Quotas

Service quotas, also referred to as limits, are the maximum number of service resources or operations for your AWS account.

Make sure you have sufficient quota for each of the services implemented in this solution. For more information, refer to AWS service quotas.

To view the service quotas for all AWS services in the documentation without switching pages, view the information in the Service endpoints and quotas page in the PDF instead.


© Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.