Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5cd0ada
Auto-merge main back to develop post release
estohlmann Nov 7, 2025
165e7b5
prisma fetch update
dustins Nov 7, 2025
788c08a
fixed prisma command
dustins Nov 7, 2025
af55f87
enable litellm logging in Rest ECS Cluster
bedanley Nov 11, 2025
fa5b978
RAG Collections Management Overhaul (#550)
bedanley Nov 12, 2025
95cfb76
Update e2e to use develop
bedanley Nov 13, 2025
adeb285
make input area auto-expand for large prompts (#554)
jmharold Nov 14, 2025
bb69bcb
LISA MCP
estohlmann Nov 17, 2025
157c5eb
Fix stack status check in create_mcp_server.py and update error handl…
estohlmann Nov 17, 2025
f973fa0
Add AI Reviews (#560)
bedanley Nov 17, 2025
2724c30
UI Cleanup
estohlmann Nov 19, 2025
c29f29e
Add HOSTED_MCP_ENABLED configuration and update UI components for MCP…
estohlmann Nov 20, 2025
499f112
Feature/brkb default collection (#561)
bedanley Nov 20, 2025
8099fd5
Add management key constant (#567)
bedanley Nov 21, 2025
87d8191
Dynamic prompt area
jmharold Nov 24, 2025
3760b1a
Feature/brkb auto discovery (#572)
bedanley Nov 25, 2025
c0474f0
vs testing issue resolution
bedanley Nov 25, 2025
2bef6a4
Enhance OpenSearch service-linked role creation by adding a stack-spe…
estohlmann Nov 25, 2025
a940aff
adding custom resource for role
estohlmann Nov 25, 2025
3e73642
Disable editing of default collections (#575)
bedanley Nov 25, 2025
8c05b1f
Improve error handling in stack polling by including event details in…
estohlmann Nov 26, 2025
493071c
Refactor MCP server deployment logic to improve error handling and en…
estohlmann Nov 26, 2025
4307451
Remove redundant test command from CDK baseline regeneration step in …
estohlmann Nov 26, 2025
fc3436b
Updating version for release v6.0.0
estohlmann Nov 26, 2025
f940742
Update code.release.branch.yml
estohlmann Nov 26, 2025
e22608f
Remove empty 204 response
bedanley Nov 26, 2025
8801c99
Create Collection docs
bedanley Nov 26, 2025
9837b5d
6.0.0 documentation cleanup
estohlmann Nov 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .github/workflows/code.ai-review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: AI Code Review

permissions:
id-token: write
contents: read
pull-requests: write

on:
pull_request:
pull_request_review_comment:
types: [created]

concurrency:
group: ${{ github.repository }}-${{ github.event.number || github.head_ref ||
github.sha }}-${{ github.workflow }}-${{ github.event_name ==
'pull_request_review_comment' && 'pr_comment' || 'pr' }}
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}

jobs:
review:
environment: dev
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The job is configured to run in the dev environment. Ensure this environment has the appropriate protection rules and approval requirements for production-grade code review workflows. Consider whether this should run in a more restricted environment or if additional safeguards are needed.

runs-on: ubuntu-latest
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: ${{ vars.AWS_REGION }}
role-to-assume: arn:aws:iam::${{ vars.AWS_ACCOUNT }}:role/${{ vars.ROLE_NAME_TO_ASSUME }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
role-duration-seconds: 7200
- name: PR Review
uses: tmokmss/bedrock-pr-reviewer@v1
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The action tmokmss/bedrock-pr-reviewer@v1 is a third-party action from an external maintainer. Consider verifying that this action is actively maintained, trustworthy, and compatible with your security and compliance requirements. Alternatively, consider implementing a custom GitHub Action or using an officially supported AWS service for code reviews.

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
debug: false
summarize: true
summarize_release_notes: true
review_file_diff: |
- Do NOT provide general feedback, summaries, explanations of changes, statements of following existing patterns, or praises for making good additions.
- Focus solely on offering specific, objective insights based on the given context and refrain from making broad comments about potential impacts on the system or question intentions behind the changes.
- Comments should have actionable changes
- Disregard formatting, stylistic, or import issues, since this should be taken care of with linters and tests
- Ignore verification comments unless there is evidence that contradicts the statement.
- Ignore functional imports for test classes. Other classes should not import within functions
review_simple_changes: false
review_comment_lgtm: false
bedrock_light_model: ${{ vars.BEDROCK_LIGHT_MODEL }}
bedrock_heavy_model: ${{ vars.BEDROCK_HEAVY_MODEL }}
2 changes: 2 additions & 0 deletions .github/workflows/code.end-to-end-test.nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ jobs:
needs: notify_e2e_start
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
with:
ref: develop
Comment on lines +32 to +33
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ref: develop parameter has been added to the checkout action. This change hardcodes the workflow to always check out the develop branch instead of the current branch being tested. For a nightly end-to-end test workflow, this may cause the workflow to test the wrong branch. Consider whether this should reference the branch that triggered the workflow or if this is intentional for nightly runs. If the intent is to always test the develop branch, this should be documented clearly.

- name: Setup Node.js
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
npm ci
- name: Run tests
run: |
npm run test
npm run test -ci
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The npm test command flag appears incorrect. The -ci flag should be --ci (with two hyphens) to properly enable CI mode in npm. Verify this is the intended behavior or correct to the standard npm CI flag format.

backend-build:
name: Backend Tests
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ lib/rag/ingestion/ingestion-image/build
*.code-workspace
.cursor
memory-bank/
.kiro/
.amazonq/

# Coverage Statistic Folders
coverage
Expand Down
11 changes: 6 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
default_language_version:
node: system
python: python3.11
repos:
- repo: local
hooks:
Expand All @@ -9,7 +10,7 @@ repos:
entry: scripts/verify-config.sh
verbose: true
language: script
files: config.yaml
files: config-base.yaml

- repo: https://github.com/PyCQA/bandit
rev: '1.7.10'
Expand Down Expand Up @@ -49,7 +50,7 @@ repos:
pass_filenames: false

- repo: https://github.com/pycqa/isort
rev: 5.13.2
rev: 7.0.0
hooks:
- id: isort
name: isort (python)
Expand All @@ -65,7 +66,8 @@ repos:
- id: ruff
args:
- --exit-non-zero-on-fix
- --per-file-ignores=test/**/*.py:E402
- --per-file-ignores=test/**/*.py:E402,test/**/*.py:PLC0415
- --fix
exclude: \.ipynb$

- repo: https://github.com/pycqa/flake8
Expand All @@ -77,11 +79,10 @@ repos:
- flake8-bugbear
- flake8-comprehensions
- flake8-debugger
- flake8-string-format
args:
- --max-line-length=120
- --extend-immutable-calls=Query,fastapi.Depends,fastapi.params.Depends
- --ignore=B008,E203, W503 # Ignore error for function calls in argument defaults
- --ignore=B008,E203,W503 # Ignore error for function calls in argument defaults
Comment on lines 82 to +85
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation is inconsistent across lines 82-85. Line 82 has extra leading whitespace compared to line 83. This should be aligned properly:

Suggested change
args:
- --max-line-length=120
- --extend-immutable-calls=Query,fastapi.Depends,fastapi.params.Depends
- --ignore=B008,E203, W503 # Ignore error for function calls in argument defaults
- --ignore=B008,E203,W503 # Ignore error for function calls in argument defaults
args:
- --max-line-length=120
- --extend-immutable-calls=Query,fastapi.Depends,fastapi.params.Depends
- --ignore=B008,E203,W503 # Ignore error for function calls in argument defaults

exclude: ^(__init__.py$|.*\/__init__.py$)


Expand Down
63 changes: 61 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,64 @@
# v6.0.0
Happy Thanksgiving! We are proud to announce the launch of our next major version, 6.0.0! This launch aligns with AWS re:invent in Las Vegas from Dec 1-5th. LISA 6.0.0 includes major enhancements to LISA's RAG capabilities. It also includes a new standalone solution, LISA MCP.

We hope you enjoy this release as much as we enjoyed building it. Please reach out to our product team via the "Contact us" button in the readme. Our product roadmap is customer driven, and we want to hear your feedback, questions, and needs as we look to 2026.


## Breaking Changes
- **API Token Table Migration**: The API token table has been renamed and moved from the Serve stack to the API Base stack (`LisaServeTokenTable` → `LisaApiBaseTokenTable`). **Export all existing API keys before upgrading** and recreate them in the new table after deployment. This affects admin keys, service accounts, and any programmatic API access.
- **Management Key Secret Migration**: The LISA management key secret has been moved to the API Base stack with a new name format: `${deploymentName}-management-key` (removed `lisa-` prefix). **Update any scripts or integrations that reference the secret by name.** The secret value will be auto-generated during deployment; export from AWS Secrets Manager before upgrading if you need to preserve the existing value. Code using the SSM parameter `${deploymentPrefix}/appManagementKeySecretName` will continue to work without changes.
- **Existing Bedrock Knowledge Base Repositories** must be redeployed to support the new collections infrastructure. This is a simple update operation that creates the necessary infrastructure for automatic data source collection creation. Use the repository update API or UI to redeploy existing Bedrock Knowledge Base repositories.

## Key Features
### LISA MCP
LISA MCP is a standalone infrastructure-as-code solution that allows administrators to deploy and host any Model Context Protocol (MCP) servers directly within LISA. This enterprise hosting platform provides turn-key infrastructure deployment, automatic scaling, and secure networking, allowing organizations to build and operate custom MCP tools without managing underlying infrastructure.
#### Enterprise Hosting Capabilities
- **Turn-key Deployment**: Deploy STDIO, HTTP, or SSE MCP servers through a single API call or intuitive UI workflow, eliminating the need for manual infrastructure configuration
- **Dynamic Container Management**: Bring your own pre-built container images or point to S3 artifacts that are automatically packaged into containers at deployment time
- **Automatic Scaling**: Configure auto-scaling policies with customizable min/max capacity, CPU, and memory settings to handle varying workloads efficiently
- **Secure VPC Networking**: All MCP servers run within your private VPC with Application and Network Load Balancers, ensuring traffic never leaves your secure network boundaries
- **API Gateway Integration**: Hosted MCP servers are automatically exposed through LISA's existing API Gateway, inheriting the same authentication, authorization, and security controls (API keys, IDP lockdown, JWT group enforcement) used across the platform
#### Administrative Control
- **MCP Management UI**: Complete lifecycle management through a dedicated admin interface where administrators create, update, start, stop, and delete hosted MCP servers
- **Group-Based Access Control**: Restrict server visibility and usage to specific identity provider groups or make them available organization-wide
- **Lifecycle Automation**: Step Functions orchestrate provisioning, health monitoring, failure handling, and connection publishing with full auditability through DynamoDB status records
- **Health Monitoring**: Built-in health checks at both the container and load balancer levels ensure reliable service availability
#### Integration & Extensibility
- **External Integration Support**: Hosted MCP servers can be accessed by external agents, copilots, RPA bots, or SaaS workloads using the same API Gateway endpoints and authentication mechanisms
- **mcp-proxy Support**: STDIO servers are automatically wrapped with `mcp-proxy` and exposed over HTTP, simplifying deployment of standard MCP server implementations
- **UI & API Parity**: Manage servers through either the MCP Management admin page or REST API endpoints (`/mcp`), providing flexibility for automation and programmatic workflows
### LISA RAG Collections
LISA's RAG capabilities just got a major upgrade! We've completely reimagined how you organize and manage RAG documents with the introduction of Collections. Collections transform how you structure your RAG content. Think of repositories as filing cabinets and collections as the organized drawers within—each with its own configuration.
#### Flexible Document Organization

- **Custom Chunking Strategies**: Configure different chunking approaches per collection (fixed-size or no chunking). If using a Bedrock Knowledge Base all service chunking strategies are supported
- **Flexible Embedding Models**: Each collection can use its own embedding model, optimizing retrieval for specific document types
- **Access Control**: Set collection-level permissions with group-based access control, making it easy to share some collections organization-wide while keeping others restricted within the same repository
- **Rich Metadata Support**: Tag documents with custom metadata at the repository, collection, or document level for powerful filtering and organization
#### Intelligent Document Lifecycle Management

- **Smart Deletion Workflows**: Delete collections asynchronously with optimized cleanup for each supported Repository
- **Document Preservation**: User-managed documents in Bedrock Knowledge Bases are automatically preserved during collection operations, ensuring you never lose important content
- **Enhanced UI Experience**: Browse, filter, and sort collections with visual status indicators, intuitive creation wizards, and document library integration with breadcrumb navigation
- **Admin-Controlled Operations**: Collection creation, updates, and deletion are restricted to administrators while regular users can continue to view and upload documents to collections they have permission to access
- **Backward Compatibility**: Existing repositories automatically get a virtual "Default" collection using the repository's embedding model with zero downtime and no database migrations required
#### Bedrock Knowledge Base Updates

- **Automatic Collection Creation**: Each Bedrock Knowledge Base Data Source gets its own collection with LISA's management capabilities
- **Custom Metadata & Tagging**: Add LISA's metadata to your Bedrock Knowledge Base documents for enhanced organization and filtering
### Other Enhancements
- Updated the prompt area to auto-expand from 2 rows to 20 rows when typing a large prompt.
- Updates for easier prisma client generation
- Enhanced logging in LISA Rest ECS cluster to include LiteLLM logs

## Acknowledgements
* @bedanley
* @dustins
* @estohlmann
* @jmharold

**Full Changelog**: https://github.com/awslabs/LISA/compare/v5.4.0..v6.0.0

# v5.4.0

## Key Features
Expand Down Expand Up @@ -32,8 +93,6 @@ Enhanced the user experience of the MCP Workbench with tool validation, error di
* @estohlmann
* @jmharold

**Full Changelog**: https://github.com/awslabs/LISA/compare/v5.3.2..v5.4.0

# v5.3.2

## Key Features
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ test-coverage:
--cov-report term-missing \
--cov-report html:build/coverage \
--cov-report xml:build/coverage/coverage.xml \
--cov-fail-under 85
--cov-fail-under 83
21 changes: 17 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
# LLM Inference Solution for Amazon Dedicated Cloud (LISA)
[![Full Documentation](https://img.shields.io/badge/Full%20Documentation-blue?style=for-the-badge&logo=Vite&logoColor=white)](https://awslabs.github.io/LISA/)
[![Contact Us](https://img.shields.io/badge/Contact%20Us-green?style=for-the-badge&logo=maildotru&logoColor=white)](mailto:lisa-product-team@amazon.com)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 'Contact Us' link has been added, which is good for user engagement. However, verify that the email address lisa-product-team@amazon.com is actively monitored and appropriate for production documentation.

## What is LISA?
Our large language model (LLM) inference solution for the Amazon Dedicated Cloud (ADC), LISA, is an open source infrastructure-as-code solution. Customers deploy LISA directly into an Amazon Web Services (AWS) account. While specially designed for ADC regions that support government customers' most sensitive workloads, LISA is also compatible with commercial regions. LISA supports model self-hosting via Amazon Elastic Container Service (ECS). LISA's LiteLLM support also makes it compatible with 100+ models hosted by external model providers, including Amazon Bedrock. LISA further complements Amazon Bedrock by accelerating GenAI adoption. LISA's optional chat assistant user interface (UI) supports model management, model prompting, document summarization, chat session management, prompt libraries, retrieval augmented generation (RAG), automated document ingestion pipelines, and other advanced features. Customers can choose to integrate custom UIs directly with LISA, relying on LISA for centralized model orchestration, chat session management, and RAG. LISA is scalable and ready to support production use cases. The roadmap is customer-driven, with new capabilities launching monthly.
Our large language model (LLM) inference solution for the Amazon Dedicated Cloud (ADC), LISA, is open source infrastructure-as-code. Customers deploy it directly into an Amazon Web Services (AWS) account in any region. LISA is scalable and ready to support production use cases.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description has been simplified from 'an open source infrastructure-as-code solution' to 'open source infrastructure-as-code', but the removal of context about ADC regions and government customers may lose important positioning information. Consider whether this simplification aligns with the product's target audience and marketing strategy.


LISA accelerates GenAI adoption by offering built-in configurability with Amazon Bedrock models, Knowledge Bases, and Guardrails. Also by offering advanced capabilities like an optional enterprise-ready chat user interface (UI) with configurable features, authentication, resource access control, centralized model orchestration via LiteLLM, model self-hosting via Amazon ECS, retrieval augmented generation (RAG), APIs, and broad model context protocol (MCP) support and features. LISA is also compatible with OpenAI’s API specification making it easily configurable with supporting solutions. For example, the Continue plugin for VSCode and JetBrains integrated development environments (IDE).
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new description is more concise but removes specific details about ECS, Bedrock integration, and use cases (document summarization, prompt libraries, etc.) that were in the original. Ensure this level of abstraction is intentional and doesn't obscure key capabilities from new users.


LISA's roadmap is customer-driven, with new capabilities launching monthly. Reach out to the product team to ask questions, provide feedback, and send feature requests via the "Contact Us" button above.

## Key Features
* **Open source**: No subscription or licensing fees. LISA costs are based on service usage. The roadmap is customer-driven with monthly releases. LISA is backed by a software development team.
* **Model Flexibility**: Bring your own models for self-hosting, or quickly configure LISA with 100+ models supported by third-party model providers, including Amazon Bedrock.
* **Open Source**: No subscription or licensing fees. LISA costs are based on service usage.
* **Ongoing Releases**: The product roadmap is customer-driven with releases typically every 2-4 weeks. LISA is backed by a software development team that builds production grade solutions to accelerate customers' GenAI adoption.
* **Model Flexibility**: Bring your own models for self-hosting, or quickly configure LISA with 100+ models supported by third-party model providers, including Amazon Bedrock and Jumpstart.
* **Model Orchestration**: Centralize and standardize unique API calls to third-party model providers automatically with LISA via LiteLLM. LISA standardizes the unique API calls into the OpenAI format automatically. All that is required is an API key, model name, and API endpoint.
* **Modular Components**: Accelerate GenAI adoption with secure, scalable software. LISA supports various use cases through configurable components: model serving and orchestration, chat user interface with advanced capabilities, authentication, retrieval augmented generation (RAG), Anthropic’s Model Context Protocol (MCP), and APIs.
* **CodeGen**: Supports OpenAI’s API specification, making LISA easily configurable with compatible solutions like the Continue plugin for VSCode and JetBrains integrated development environments (IDEs). This allows users to select from any LISA configured model to support LLM prompting directly in their IDE.
* **CodeGen**: LISA supports OpenAI’s API specification, making it easily configurable with compatible solutions like the Continue plugin for VSCode and JetBrains IDEs.
* **FedRAMP**: Leverages FedRAMP High compliant services.

## Major Components
LISA’s four major components include Serve, a Chat UI, RAG, and MCP. LISA Serve and LISA MCP are standalone, foundational core solutions with APIs for customers not leveraging LISA’s Chat UI. Both LISA’s Chat UI and RAG are optional components, but must be used with Serve.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The statement 'LISA Serve and LISA MCP are standalone, foundational core solutions' introduces LISA MCP as a major component, which aligns with the v6.0.0 release. However, clarify whether LISA MCP requires Serve as a dependency or if it is truly independent, as the current wording could be ambiguous.


Read more in the Architecture Overview section of LISA's documentation site linked above.

## Deployment Prerequisites
### Pre-Deployment Steps
* Set up or have access to an AWS account.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.4.0
6.0.0
3 changes: 2 additions & 1 deletion cypress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"cypress:smoke:run": "cypress run --config-file cypress.smoke.config.ts",
"clean": "rm -rf node_modules/",
"lint:fix": "eslint --fix src/",
"format": "eslint --fix src/"
"format": "eslint --fix src/",
"test": "echo \"E2E tests run separately via cypress:e2e:run or cypress:smoke:run\""
},
"lint-staged": {
"**/*.{js,jsx,ts,tsx}": [
Expand Down
1 change: 1 addition & 0 deletions cypress/src/smoke/fixtures/env.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
"RESTAPI_URI": "",
"RESTAPI_VERSION": "v2",
"RAG_ENABLED": true,
"HOSTED_MCP_ENABLED": true,
"API_BASE_URL": "/dev/"
}
4 changes: 3 additions & 1 deletion cypress/src/support/adminHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,16 @@ export function expandAdminMenu () {
.should('be.visible');

cy.get('[role="menuitem"]')
.should('have.length', 2)
.should('have.length', 4)
.then(($items) => {
const labels = $items
.map((_, el) => Cypress.$(el).text().trim())
.get();
expect(labels).to.deep.equal([
'Configuration',
'Model Management',
'RAG Management',
'MCP Management',
]);
});
}
Expand Down
2 changes: 1 addition & 1 deletion ecs_model_deployer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"pack:prod": "cd ./dist && npm i --omit dev",
"copy-dist": "mkdir -p ../dist/ecs_model_deployer && cp -r ./dist/* ../dist/ecs_model_deployer/",
"clean": "rm -rf ./dist/",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"No tests for ECS model deployer package\""
},
"author": "",
"license": "Apache-2.0",
Expand Down
4 changes: 2 additions & 2 deletions ecs_model_deployer/src/lib/ecs-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Construct } from 'constructs';

import { ECSCluster } from './ecsCluster';
import { getModelIdentifier } from './utils';
import { Ec2Metadata, EcsClusterConfig, EcsSourceType, PartialConfig } from '../../../lib/schema';
import { APP_MANAGEMENT_KEY, Ec2Metadata, EcsClusterConfig, EcsSourceType, PartialConfig } from '../../../lib/schema';
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The import of APP_MANAGEMENT_KEY constant is good for reducing magic strings. Verify that this constant is properly exported from ../../../lib/schema and that its value matches the expected parameter path format used throughout the codebase.

import { StringParameter } from 'aws-cdk-lib/aws-ssm';

// This is the amount of memory to buffer (or subtract off) from the total instance memory, if we don't include this,
Expand Down Expand Up @@ -106,7 +106,7 @@ export class EcsModel extends Construct {
MODEL_NAME: modelConfig.modelName,
LOCAL_CODE_PATH: modelConfig.localModelCode, // Only needed when s5cmd is used, but just keep for now
AWS_REGION: config.region ?? '', // needed for s5cmd
MANAGEMENT_KEY_NAME: StringParameter.valueForStringParameter(this, `${config.deploymentPrefix}/managementKeySecretName`)
MANAGEMENT_KEY_NAME: StringParameter.valueForStringParameter(this, `${config.deploymentPrefix}/${APP_MANAGEMENT_KEY}`)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from hardcoded 'managementKeySecretName' to the APP_MANAGEMENT_KEY constant improves maintainability. However, ensure that the constant value is exactly 'managementKeySecretName' to maintain backward compatibility with existing SSM parameter paths. If the constant has a different value, this could break existing deployments.

};

if (modelConfig.modelType === 'embedding') {
Expand Down
Loading
Loading