{"id":22816508,"url":"https://github.com/msysh/aws-sample-line-bot-with-amazon-bedrock","last_synced_at":"2026-04-17T09:31:20.591Z","repository":{"id":215933965,"uuid":"740057043","full_name":"msysh/aws-sample-line-bot-with-amazon-bedrock","owner":"msysh","description":"This project is a sample AI Chat Bot using Amazon Bedrock for LINE (LINE is the popular messaging app in Japan).","archived":false,"fork":false,"pushed_at":"2024-01-07T17:41:30.000Z","size":478,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T22:42:05.821Z","etag":null,"topics":["aws","bedrock","line-bot","step-functions"],"latest_commit_sha":null,"homepage":"https://blog.msysh.me/posts/2024/01/line_bot_with_amazon_bedrock.html","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msysh.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}},"created_at":"2024-01-07T11:55:26.000Z","updated_at":"2025-03-25T04:57:37.000Z","dependencies_parsed_at":"2024-01-07T14:26:52.681Z","dependency_job_id":"d5784205-adcc-4757-b722-a93bb7e70c76","html_url":"https://github.com/msysh/aws-sample-line-bot-with-amazon-bedrock","commit_stats":null,"previous_names":["msysh/aws-sample-line-bot-with-amazon-bedrock"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/msysh/aws-sample-line-bot-with-amazon-bedrock","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msysh%2Faws-sample-line-bot-with-amazon-bedrock","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msysh%2Faws-sample-line-bot-with-amazon-bedrock/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msysh%2Faws-sample-line-bot-with-amazon-bedrock/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msysh%2Faws-sample-line-bot-with-amazon-bedrock/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msysh","download_url":"https://codeload.github.com/msysh/aws-sample-line-bot-with-amazon-bedrock/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msysh%2Faws-sample-line-bot-with-amazon-bedrock/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31923071,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-17T09:10:15.403Z","status":"ssl_error","status_checked_at":"2026-04-17T09:10:14.455Z","response_time":62,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","line-bot","step-functions"],"created_at":"2024-12-12T14:07:46.096Z","updated_at":"2026-04-17T09:31:20.573Z","avatar_url":"https://github.com/msysh.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LINE AI Chatbot with Amazon Bedrock\n\n[日本語の情報 (for Japanese)](https://blog.msysh.me/posts/2024/01/line_bot_with_amazon_bedrock.html)\n\nThis project is an AI Chat Bot using Amazon Bedrock for LINE (LINE is the popular messaging app in Japan).\n\nIt features a serverless chatbot implemented in less code using Bedrock, AWS' generative AI service, and Step Functions, a workflow service.\n\n## Architecture\n\n![architecture](./doc/images/architecture.svg)\n\n## Pre-requirement\n\nFirst, make Anthropic's Claude available through Amazon Bedrock's \"Model access\" in the AWS Management Console. See the [documentation](https://docs.aws.amazon.com/bedrock/latest/userguide/model-access.html) for details.\n\nThis project are provisioned by the AWS Cloud Development Kit (CDK). If you have not installed the CDK, first install it by referring to the [documents](https://docs.aws.amazon.com/cdk/v2/guide/getting_started.html).\n\nThen, since it is a LINE bot, it is necessary to create a channel used the LINE Messaging API. You can create that channel after creating a provider in the [LINE Developers console](https://developers.line.biz/console/).\n\n## How to setup\n\n### 1. Create LINE Channel\n\nIn the [LINE Developers console](https://developers.line.biz/console/), create a provider and create a channel used the Messaging API.\n\n![Create channel used the Messaging API](./doc/images/create-channel-used-messaging-api.png)\n\n### 2. Enable Webhook URL\n\nEnable \"Webhook URL\" in LINE Developer console.\n\n![Enable Webhook URL](./doc/images/enable-webhook-url.png)\n\n### 3. Issue \"Channel secret\" and \"Channel access token\"\n\n**Channel secret** can be issued in \"Basic settings\" tab.  \n**Channel access token** can be issued in \"Messaging API\" tab.\n\nNote both values.\n\n### 4. Configure CDK context parameter\n\nSet values in the home directory `~/.cdk.json` with the channel secret and access token of LINE issued in previous step as parameters. If the file does not exist, create it.\n\n_It will work even if you set the secret in `cdk.json` in the repository, but it is safer to set it in a file in your home directory because there is a risk of accidentally pushing the secret and having it published._\n\nAdd `\"line-bot-with-amazon-bedrock\": {...}` the following:\n\n```json\n{\n  //   :\n  // (snip)\n  //   :\n  \"line-bot-with-amazon-bedrock\": {\n    \"secret\": \"...(channel secret)...\",\n    \"accessToken\": \"...(channel access token)...\"\n  }\n}\n```\n\n### 5. Clone this repository\n\n```sh\ngit clone https://github.com/msysh/aws-sample-line-bot-with-amazon-bedrock.git\n```\n\n### 6. Provision AWS resources\n\n```sh\ncd line-bot-with-amazon-bedrock\ncdk deploy --all\n```\n\n### 7. Configure Webhook URL\n\nYou can get an API Gateway URL endpoint from cdk deploy output.\n\n```\nLineBotWithAmazonBedrock.ApiGatewayEndpointXXX = https://xxxxx.execute-api.us-east-1.amazonaws.com/prod/\n```\n\nConfigure the endpoint URL as Webhook URL in LINE Developers console.\n\n![Configure Webhook URL](./doc/images/configure-webhook-url.png)\n\n### 8. Add as friend in LINE app\n\nUse the QR code displayed in the \"Messaging API\" tab in the LINE Developers console to add a friend and have a conversation!\n\n### 9. Customize prompt\n\nIf you want to customize the prompt, go to the AWS Management Console and change the parameter `/line-bot-with-amazon-bedrock/prompt-template` in the Systems Manager Parameter Store. \n\nThe first `{}` will be replaced by the conversation history and the second `{}` by the message from user.\n\n## Clean up\n\nIf you want to delete an AWS resource, execute the following command:\n\n```sh\ncdk destroy --all\n```\n\n## Chat Sample with prompt engineering\n\nPrompt engineering allows for chatbots with a variety of characters.\n\n![Chat sample with customizing prompt](./doc/images/sample1.png)\n\n## License\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsysh%2Faws-sample-line-bot-with-amazon-bedrock","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsysh%2Faws-sample-line-bot-with-amazon-bedrock","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsysh%2Faws-sample-line-bot-with-amazon-bedrock/lists"}