{"id":16696891,"url":"https://github.com/seratch/bolt-kotlin-on-aws-lambda","last_synced_at":"2025-04-10T02:52:15.335Z","repository":{"id":139894015,"uuid":"243571106","full_name":"seratch/bolt-kotlin-on-aws-lambda","owner":"seratch","description":"Building Bolt Java apps on AWS Lambda","archived":false,"fork":false,"pushed_at":"2022-07-15T21:08:28.000Z","size":41,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-24T04:22:22.466Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://github.com/slackapi/java-slack-sdk","language":"Kotlin","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/seratch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-02-27T17:05:26.000Z","updated_at":"2021-12-15T15:45:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"4a40594b-00e7-439c-8b8c-d2ee4bb9cf39","html_url":"https://github.com/seratch/bolt-kotlin-on-aws-lambda","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/seratch%2Fbolt-kotlin-on-aws-lambda","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fbolt-kotlin-on-aws-lambda/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fbolt-kotlin-on-aws-lambda/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seratch%2Fbolt-kotlin-on-aws-lambda/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seratch","download_url":"https://codeload.github.com/seratch/bolt-kotlin-on-aws-lambda/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248147076,"owners_count":21055475,"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-10-12T17:45:09.613Z","updated_at":"2025-04-10T02:52:15.327Z","avatar_url":"https://github.com/seratch.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Bolt for Java runs on AWS Lambda\n\nThis is a sample project for building [Bolt for Java](https://github.com/slackapi/java-slack-sdk) apps running on AWS Lambda.\n\nOn your local machine, I recommend running the app with the [Quarkus](https://quarkus.io/) framework (specifically using the [quarkus-undertow](https://quarkus.io/guides/http-reference)). You'll enjoy all the benefits of [Quarkus's development mode](https://quarkus.io/guides/getting-started). \n\nOnce you make sure if your app works as expected, it's time to deploy the app onto [AWS API Gateway](https://aws.amazon.com/api-gateway/) / [Lambda](https://aws.amazon.com/lambda/)! Just running `./deploy.sh` does everything for you. The shell script internally runs `maven shade:shade` to build a uber jar that runs on the cloud, applies Cloud Formation for preparing all the resources, and then deploys the app as Lambda functions.\n\n## Required Tools\n\n* [OpenJDK 8 or 11](https://openjdk.java.net/install/) (`java`, `javac`)\n  * [Maven 3](https://maven.apache.org/) (`mvn`)\n* [Serverless Framework](https://serverless.com/) (`serverless`, `sls`)\n  * [AWS CLI](https://aws.amazon.com/cli/) (`aws`)\n  * [Python 3](https://www.python.org/) (`python3`, `pip3`)\n\n```\n# install JDK, Maven (mvn command)\nbrew install openjdk@11\nbrew install maven\n\n# install serverless command\nnpm i\n\n# AWS CLI\ncurl -O https://bootstrap.pypa.io/get-pip.py\npython3 get-pip.py --user\npip3 install awscli --upgrade --user\naws configure\n```\n\n## AWS Resources\n\nThe only thing you need to manually do is to create an S3 bucket for storing OAuth state values and bot/user tokens. Needless to say, please be careful with its access permissions.\n\n```\nexport SLACK_APP_AMAZON_S3_BUCKET=your-own-unique-bucket-name\n```\n\nApart from it, everything will be done by Serverless Framework's Cloud Formation tasks!\n\n## Slack App Configuration\n\nConfigure the followings [here](https://api.slack.com/apps).\n\n* **App Home**\n  * Turn \"Home Tab\" On\n* **Interactive Components**\n  * Turn \"Interactivity\" On\n  * Set the \"Request URL\" with the valid \"Request URL\" below\n  * Add shortcuts\n    * Global shortcut - Callback ID: `test-global-shortcut`\n    * Message shortcut - Callback ID: `test-message-action`\n  * Set the valid \"Request URL\" below for Select Menus's Options Load URL\n* **Slash Commands**\n  * Add `/time`, `/test-modal`, `/test-dialog`, `/test-attachments` with the valid \"Request URL\" below\n* **OAuth \u0026 Permissions**\n  * Add a \"Redirect URL\" with the valid \"Redirect URL\" below\n  * Scopes \u003e Bot Token Scopes\n    * app_mentions:read\n    * chat:write\n    * chat:write.public\n    * commands\n* **Event Subscriptions**\n  * Turn \"Enable Events\" On\n  * Set the \"Request URL\" with the valid \"Request URL\" below\n  * Subscribe to bot events\n    * `app_home_opened`\n    * `app_mention`\n\nThe \"Request URL\" would be:\n* Local: `https://{your domain}.ngrok.io/slack/events`\n* AWS: `https://{your domain].amazonaws.com/${SERVERLESS_STAGE}/slack/events`\n\nThe \"Redirect URL\" would be:\n* Local: `https://{your domain}.ngrok.io/slack/oauth/callback`\n* AWS: `https://{your domain].amazonaws.com/${SERVERLESS_STAGE}/oauth/callback`\n\n\n## Local Development\n\n```bash\ncp -p _env .env_dev # and then modify it\nsource .env_dev\nmvn quarkus:dev # localhost:3000\n```\n\n```bash\nngrok http 3000 --subdomain {your domain here}\n```\n\nAccess `https://{your domain}.ngrok.io/slack/oauth/start` in your web browser to install the app to a workspace.\n\n## deployment\n\n```bash\ncp -p _env_aws .env_aws_prod\nsource .env_aws_prod\n./deploy.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseratch%2Fbolt-kotlin-on-aws-lambda","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fseratch%2Fbolt-kotlin-on-aws-lambda","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fseratch%2Fbolt-kotlin-on-aws-lambda/lists"}