{"id":24393562,"url":"https://github.com/sv222/slack-lambda-s3","last_synced_at":"2026-04-09T09:59:48.231Z","repository":{"id":135305626,"uuid":"603523548","full_name":"sv222/slack-lambda-s3","owner":"sv222","description":"A simple AWS Lambda function written in Go that responds to Slack file uploads, copies the files to an S3 bucket, and returns a success message.","archived":false,"fork":false,"pushed_at":"2023-02-18T19:26:40.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-19T18:44:16.226Z","etag":null,"topics":["aws","go","lambda","s3","slack","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sv222.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}},"created_at":"2023-02-18T19:15:16.000Z","updated_at":"2023-09-03T17:05:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"70f0d237-de9f-483f-ab59-965ef417a151","html_url":"https://github.com/sv222/slack-lambda-s3","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/sv222%2Fslack-lambda-s3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sv222%2Fslack-lambda-s3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sv222%2Fslack-lambda-s3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sv222%2Fslack-lambda-s3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sv222","download_url":"https://codeload.github.com/sv222/slack-lambda-s3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243324268,"owners_count":20273099,"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":["aws","go","lambda","s3","slack","terraform"],"created_at":"2025-01-19T18:40:32.800Z","updated_at":"2025-12-25T09:47:26.251Z","avatar_url":"https://github.com/sv222.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Upload files to AWS S3 via Slack with Lambda Function\n\nThis project contains an AWS Lambda function written in Go that responds to a Slack event API request containing a file upload, copies the file to an S3 bucket, and returns a success message.\n\n## Usage\n\n### 1. Clone the repository\n\n```sh\ngit clone https://github.com/sv222/slack-lambda-s3.git\ncd slack-lambda-s3\n```\n\n### 2. Create an S3 bucket\n\n```sh\ncd terraform\nterraform init\nterraform apply \\\n  -var=\"bucket_name=my-bucket-name\" \\\n  -var=\"region=us-west-2\"\n```\n\nReplace my-bucket-name with the desired name of the S3 bucket, and replace us-west-2 with the desired AWS region.\n\n### 3. Configure the Slack app and AWS Lambda function\n\n1. Create a new Slack app with an event subscription for file_shared.\n2. Create a new AWS Lambda function with the slack-s3-lambda.zip deployment package.\n3. Set the following environment variables for the Lambda function:\n\n```sh\nAWS_REGION: the AWS region in which the S3 bucket was created\nSLACK_BOT_TOKEN: the Slack bot token for the app\n```\n\n### 4. Deploy the Lambda function\n\n```sh\ncd lambda\nGOOS=linux go build -o main\nzip slack-lambda-s3.zip main\naws lambda update-function-code \\\n  --function-name=my-lambda-function \\\n  --zip-file fileb://slack-lambda-s3.zip\n```\n\nReplace my-lambda-function with the name of the Lambda function.\n\n### 5. Test the Lambda function\n\n- Upload a file to a Slack channel that the Slack app is a member of.\n- Verify that the file was copied to the S3 bucket and that the Lambda function returned a success message.\n\n## Configuration\n\nThe Terraform configuration for the S3 bucket is located in the terraform directory. The following variables can be passed to Terraform:\n\n```sh\nbucket_name: The name of the S3 bucket to create.\nregion: The AWS region in which to create the S3 bucket.\n```\n\nThe AWS Lambda function code is located in the lambda directory. The following environment variables must be set:\n\n```sh\nAWS_REGION: The AWS region in which the S3 bucket was created.\nSLACK_BOT_TOKEN: The Slack bot token for the app.\n```\n\n## Contributing\n\nFeel free to contribute to this project by submitting pull requests or reporting issues.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsv222%2Fslack-lambda-s3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsv222%2Fslack-lambda-s3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsv222%2Fslack-lambda-s3/lists"}