{"id":19711898,"url":"https://github.com/ricoledan/deploying-chromadb-on-aws","last_synced_at":"2026-03-19T11:12:48.099Z","repository":{"id":162344051,"uuid":"636848385","full_name":"Ricoledan/deploying-chromadb-on-aws","owner":"Ricoledan","description":"⚙️ Code example for Deploying ChromaDB on AWS using CloudFormation","archived":false,"fork":false,"pushed_at":"2023-05-06T03:34:06.000Z","size":4,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T14:29:55.462Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ricoledan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-05T19:43:24.000Z","updated_at":"2024-02-01T19:39:20.000Z","dependencies_parsed_at":"2023-07-11T01:15:12.976Z","dependency_job_id":null,"html_url":"https://github.com/Ricoledan/deploying-chromadb-on-aws","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ricoledan%2Fdeploying-chromadb-on-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ricoledan%2Fdeploying-chromadb-on-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ricoledan%2Fdeploying-chromadb-on-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ricoledan%2Fdeploying-chromadb-on-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ricoledan","download_url":"https://codeload.github.com/Ricoledan/deploying-chromadb-on-aws/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241029956,"owners_count":19896997,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T22:14:32.707Z","updated_at":"2026-03-03T08:04:07.066Z","avatar_url":"https://github.com/Ricoledan.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploying ChromaDB on AWS\n⚙️ Code example for [Deploying ChromaDB on AWS](https://medium.com/@ricoledan/deploying-chromadb-on-aws-37c448331911)\n\nThis AWS CloudFormation template creates a stack that runs Chroma on a single EC2 instance.\nThe instance is configured with Docker and Docker Compose, which are used to run Chroma and ClickHouse services.\n\n## Components\n\nThese parameters can be provided when creating the stack:\n* KeyName: The name of an existing EC2 KeyPair for SSH access to the instance. (Optional)\n* InstanceType: The type of EC2 instance to be created. (Default: \"m5.4xlarge\")\n* ChromaVersion: The Chroma version to install. (Default: \"0.3.21\")\n* Conditions: Defines a condition named HasKeyName to check if a KeyName is provided.\n\n### Resources\n\nChromaInstance:\n* AMI ID\n* InstanceType\n* UserData\n* SecurityGroupIds\n* KeyName (if provided)\n* BlockDeviceMappings (with a volume size of 24 GB).\n* ChromaInstanceSecurityGroup: An EC2 security group with ingress rules for SSH (port 22) and Chroma server (port 8000).\n\n### Outputs: \n\nThe public IP address of the Chroma server is provided as an output named ServerIp.\n\n### Mappings:\n\nThe template includes a mapping named Region2AMI with Amazon Linux 2 AMI IDs and root device names for each AWS region.\n\n### UserData: \n\nThe UserData section in the template installs Docker and Docker Compose, creates the necessary configuration files, and starts Chroma and ClickHouse services using Docker Compose.\n\n## Commands\n\n### Launch the AWS CloudFormation template\n\n```bash\naws cloudformation create-stack --stack-name chroma-stack --template-body file://./chroma.cf.json \\\n--parameters ParameterKey=InstanceType,ParameterValue=m5.4xlarge\n```\n\n### Get the public IP address of your new Chroma server\n\n```bash\naws cloudformation describe-stacks --stack-name chroma-stack --query 'Stacks[0].Outputs'\n```\n\n### Set the environmental variables within the newly created EC2 in the AWS Console\n\n```bash\nexport CHROMA_API_IMPL=rest\nexport CHROMA_SERVER_HOST=\u003cserver IP address\u003e\nexport CHROMA_SERVER_HTTP_PORT=8000\n```\n\n### Code Example: Add the server details to your application\n\n```python\nimport chromadb\nfrom chromadb.config import Settings\n\nchroma = chromadb.Client(Settings(chroma_api_impl=\"rest\",\nchroma_server_host=\"\u003cserver IP address\u003e\",\n    chroma_server_http_port=8000))\n```\n\n### Delete Resources\n\n```bash\naws cloudformation delete-stack --stack-name chroma-stack\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricoledan%2Fdeploying-chromadb-on-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricoledan%2Fdeploying-chromadb-on-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricoledan%2Fdeploying-chromadb-on-aws/lists"}