{"id":26479343,"url":"https://github.com/juhamust/bitbucket2sns","last_synced_at":"2025-07-23T19:34:20.832Z","repository":{"id":140970802,"uuid":"57897285","full_name":"juhamust/bitbucket2sns","owner":"juhamust","description":"Serverless powered lambda function to convert Bitbucket webhook msgs into AWS SNS","archived":false,"fork":false,"pushed_at":"2017-06-28T04:33:20.000Z","size":241,"stargazers_count":12,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T17:11:11.516Z","etag":null,"topics":["aws-sns","bitbucket","lambda","notifications","serverless","trigger","webhook-requests"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/juhamust.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":"2016-05-02T14:48:51.000Z","updated_at":"2021-02-04T21:52:51.000Z","dependencies_parsed_at":"2023-06-29T06:01:06.685Z","dependency_job_id":null,"html_url":"https://github.com/juhamust/bitbucket2sns","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/juhamust/bitbucket2sns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhamust%2Fbitbucket2sns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhamust%2Fbitbucket2sns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhamust%2Fbitbucket2sns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhamust%2Fbitbucket2sns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juhamust","download_url":"https://codeload.github.com/juhamust/bitbucket2sns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juhamust%2Fbitbucket2sns/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266738345,"owners_count":23976417,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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-sns","bitbucket","lambda","notifications","serverless","trigger","webhook-requests"],"created_at":"2025-03-20T01:41:16.122Z","updated_at":"2025-07-23T19:34:20.821Z","avatar_url":"https://github.com/juhamust.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitbucket2SNS\n\nBitbucket2SNS transforms Bitbucket webhook requests into [AWS SNS](https://aws.amazon.com/sns/) -notifications, making it easy to integrate with other AWS services, for example run [Lambda function](https://aws.amazon.com/lambda/) on every commit.\n\n![Sequence](https://raw.githubusercontent.com/juhamust/bitbucket2sns/master/assets/bitbucket2sns.png)\n\n[![Build Status](https://travis-ci.org/juhamust/bitbucket2sns.svg?branch=master)](https://travis-ci.org/juhamust/bitbucket2sns)\n\n### Deploy to AWS\n\nInstall recent Node (v6.10 preferred) and Serverless packages. Usage of `nvm` is encouraged.\n\n```bash\n# Install Node and Serverless\nnvm use v6.10\nnpm install -g serverless@1.12\nsls --version\n\n# Clone and init codebase\ngit clone https://github.com/juhamust/bitbucket2sns.git\ncd bitbucket2sns/\nnpm install\n\n# Edit settings if needed\nvim env.yml\n\n# Deploy\nsls deploy --profile=my-aws-profile\n\n# Output (copy endpoint address)\n\u003e Service Information\n\u003e service: bitbucket2sns\n\u003e stage: dev\n\u003e region: eu-central-1\n\u003e api keys:\n\u003e   None\n\u003e endpoints:\n\u003e   POST - https://123123.execute-api.eu-central-1.amazonaws.com/dev/webhook\n\u003e functions:\n\u003e   webhook: bitbucket2sns-dev-webhook\n```\n\n### Configure Bitbucket repository\n\n1. Open Bitbucket repository (that you want to send webhook requests to AWS) settings\n1. Open webhook -section in Bitbucket repository: Settings \u003e Integrations \u003e Webhooks\n1. Click **Add webhook** and paste the collected URL **and** set the authentication token as `?token=\u003ctokenvalue\u003e` (usage of token is optional but recommended). Example: `https://123123.execute-api.eu-west-1.amazonaws.com/dev/webhook?token=secret`\n1. You can test the functionality by committing a new change set. Bitbucket webhook requests can be reviewed after sending in **View requests**.\n\n  ![Bitbucket settings](https://raw.githubusercontent.com/juhamust/bitbucket2sns/master/assets/config-bitbucket-webhook.png)\n\n1. You can see the Lambda logs in [AWS CloudWatch](https://aws.amazon.com/cloudwatch/)\n\n### Define lambda for SNS message (optional)\n\nOnce you've setup Bitbucket - SNS properly configured, you can start using it. Following snippet shows how to trigger a lambda on notification.\n\n1. Go to Lambda -service\n1. Start new Lambda with **Create a Lambda function**\n1. Type in the code (see example)\n1. Use `bitbucket-sns` as event source\n1. See Monitoring section for lambda logs\n\n```javascript\n'use strict';\nconsole.log('Loading function');\n\nexports.handler = (event, context, callback) =\u003e {\n  const message = event.Records[0].Sns.Message;\n  console.log('From SNS:', message);\n  callback(null, message);\n};\n```\n![Lambda event source](https://raw.githubusercontent.com/juhamust/bitbucket2sns/master/assets/config-aws-lambda-sources.png)\n\n## Changelog\n\n#### 0.2.0\n\n- Support for Serverless 1.x\n- Added unit testing\n\n#### 0.1.0\n\n- Initial release\n\n## License\n\nMIT -licensed\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuhamust%2Fbitbucket2sns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuhamust%2Fbitbucket2sns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuhamust%2Fbitbucket2sns/lists"}