{"id":45283245,"url":"https://github.com/tyyzqmf/ai-chatbot-on-aws","last_synced_at":"2026-02-21T02:41:30.958Z","repository":{"id":303181814,"uuid":"1013187360","full_name":"tyyzqmf/ai-chatbot-on-aws","owner":"tyyzqmf","description":"An Open-Source AI Chatbot Template Built With Next.js and the AI SDK by Vercel. Deployed on AWS using CDK. LLM provider: AWS Bedrock.","archived":false,"fork":false,"pushed_at":"2026-02-17T00:25:10.000Z","size":692,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-17T06:53:01.178Z","etag":null,"topics":["aws-bedrock","chatbot","nextjs"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tyyzqmf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-03T13:45:41.000Z","updated_at":"2025-12-23T23:12:34.000Z","dependencies_parsed_at":"2025-07-15T02:13:03.031Z","dependency_job_id":"0fa6f56f-96ea-4e41-be8a-afb400471387","html_url":"https://github.com/tyyzqmf/ai-chatbot-on-aws","commit_stats":null,"previous_names":["tyyzqmf/ai-chatbot-on-aws"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tyyzqmf/ai-chatbot-on-aws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyyzqmf%2Fai-chatbot-on-aws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyyzqmf%2Fai-chatbot-on-aws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyyzqmf%2Fai-chatbot-on-aws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyyzqmf%2Fai-chatbot-on-aws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tyyzqmf","download_url":"https://codeload.github.com/tyyzqmf/ai-chatbot-on-aws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tyyzqmf%2Fai-chatbot-on-aws/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29671815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T00:11:43.526Z","status":"online","status_checked_at":"2026-02-21T02:00:07.432Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["aws-bedrock","chatbot","nextjs"],"created_at":"2026-02-21T02:41:30.841Z","updated_at":"2026-02-21T02:41:30.943Z","avatar_url":"https://github.com/tyyzqmf.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eAI Chatbot on AWS\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  An Open-Source AI Chatbot Template Built With Next.js and the AI SDK by Vercel. Deployed on AWS using CDK. LLM provider: AWS Bedrock.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#architecture\"\u003e\u003cstrong\u003eArchitecture\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#model-providers\"\u003e\u003cstrong\u003eModel Providers\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#deploy-your-own\"\u003e\u003cstrong\u003eDeploy Your Own\u003c/strong\u003e\u003c/a\u003e ·\n  \u003ca href=\"#running-locally\"\u003e\u003cstrong\u003eRunning locally\u003c/strong\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cbr/\u003e\n\n## Architecture\n\n![architecture](images/architecture.png)\n\n- [Next.js](https://nextjs.org) App Router\n  - Advanced routing for seamless navigation and performance\n  - React Server Components (RSCs) and Server Actions for server-side rendering and increased performance\n- [AI SDK](https://sdk.vercel.ai/docs)\n  - Unified API for generating text, structured objects, and tool calls with LLMs\n  - Hooks for building dynamic chat and generative user interfaces\n  - Supports xAI (default), Amazon Bedrock, OpenAI, Fireworks, and other model providers\n- [Fargate](https://aws.amazon.com/fargate)\n  - Container orchestration service, running API services and core business logic\n  - Works with [Application Load Balancer](https://docs.aws.amazon.com/elasticloadbalancing/latest/application/introduction.html) to ensure stable streaming requests\n- [shadcn/ui](https://ui.shadcn.com)\n  - Styling with [Tailwind CSS](https://tailwindcss.com)\n  - Component primitives from [Radix UI](https://radix-ui.com) for accessibility and flexibility\n- Data Persistence\n  - [Amazon RDS for PostgreSQL](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html) for saving chat history and user data\n  - [Amazon S3](https://docs.aws.amazon.com/AmazonS3/latest/userguide/Welcome.html) for efficient file storage\n- Content delivery\n  - [Amazon CloudFront](https://docs.aws.amazon.com/cloudfront/) for caching and content delivery\n- [Auth.js](https://authjs.dev)\n  - [Amazon Cognito](https://docs.aws.amazon.com/cognito/) for user management and authentication\n\n## Model Providers\n\nThis template ships with [Amazon Bedrock](https://docs.aws.amazon.com/bedrock/) `Claude 3.5 Haiku, Anthropic` as the default chat model. However, with the [AI SDK](https://sdk.vercel.ai/docs), you can switch LLM providers to [OpenAI](https://openai.com), [Anthropic](https://anthropic.com), [Cohere](https://cohere.com/), and [many more](https://sdk.vercel.ai/providers/ai-sdk-providers) with just a few lines of code.\n\n## Deploy Your Own\n\n**Step 1.** Install the project dependencies and build the project.\n\n```bash\nsudo npm install -g pnpm\npnpm install \u0026\u0026 pnpm projen \u0026\u0026 pnpm build\n```\n\n**Step 2.** Once done, run the configuration command to help you set up the solution with the features you need:\n\n```bash\nnpm run config\n```\n\nYou need to provide an administrator's `email`.\n\nWhen done, answer `Y` to create or update your configuration.\n\nYour configuration is now stored under `src/config.json`. You can re-run the `npm run config` command as needed to update your `config.json`\n\n**Step 3.** AWS CDK deploy on the target account and region\n\nYou can now deploy by running:\n\n```bash\npnpm run deploy\n```\n\n## Running locally\n\nGoto the folder: `src/portal`, run script:\n\n```shell\n./dev.sh [-p \u003cAWS_PROFILE\u003e] [-r \u003cAWS_REGION\u003e]\n```\n\nYour app should now be running on [localhost:3000](http://localhost:3000).\n\n\n### Connecting to an Amazon RDS for PostgreSQL from outside an Amazon VPC\n\nAmazon RDS for PostgreSQL instance are deployed within an Amazon Virtual Private Cloud (Amazon VPC). They can be accessed directly by Amazon EC2 instances or other AWS services that are deployed in the same Amazon VPC. Additionally, Amazon DocumentDB can be accessed by EC2 instances or other AWS services in different VPCs in the same AWS Region or other Regions via VPC peering.\n\n[Connecting to an Amazon PostgreSQL DB instance from outside an Amazon VPC](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_GettingStarted.CreatingConnecting.PostgreSQL.html#CHAP_GettingStarted.Connecting.PostgreSQL)\n\n### Create a tunnel to the Amazon RDS for PostgreSQL instance\n\nFor example, you might need to add -i for identity file or other SSH options\n\n```\nssh -i \"xxx.pem\" -L $LOCAL_PORT:$POSTGRES_HOST:$POSTGRES_PORT user@bastion-host -N\n```\n\n- `LOCAL_PORT`: The port on your local machine that you want to use to connect to the database.\n- `POSTGRES_HOST`: The hostname of the Amazon RDS for PostgreSQL instance.\n- `POSTGRES_PORT`: The port on which the Amazon RDS for PostgreSQL instance is listening (default is 5432).\n- `user`: The username you use to connect to the bastion host.\n- `bastion-host`: The public IP address or hostname of the bastion host.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyyzqmf%2Fai-chatbot-on-aws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftyyzqmf%2Fai-chatbot-on-aws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftyyzqmf%2Fai-chatbot-on-aws/lists"}