{"id":19076274,"url":"https://github.com/jaaaco/ec2-sns","last_synced_at":"2026-04-29T16:02:04.482Z","repository":{"id":57219122,"uuid":"89879288","full_name":"jaaaco/ec2-sns","owner":"jaaaco","description":"AWS SNS client designed especially for AWS ECS Cluster and Docker","archived":false,"fork":false,"pushed_at":"2017-05-03T20:43:36.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-16T00:31:45.372Z","etag":null,"topics":["aws","docker","ec2","ecs","ecs-cluster","sns","sns-client"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jaaaco.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-04-30T21:47:47.000Z","updated_at":"2024-04-17T23:36:14.000Z","dependencies_parsed_at":"2022-08-29T02:12:00.382Z","dependency_job_id":null,"html_url":"https://github.com/jaaaco/ec2-sns","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/jaaaco%2Fec2-sns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaaco%2Fec2-sns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaaco%2Fec2-sns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jaaaco%2Fec2-sns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jaaaco","download_url":"https://codeload.github.com/jaaaco/ec2-sns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240127979,"owners_count":19752089,"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","docker","ec2","ecs","ecs-cluster","sns","sns-client"],"created_at":"2024-11-09T01:58:37.335Z","updated_at":"2026-04-29T16:01:59.418Z","avatar_url":"https://github.com/jaaaco.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm](https://img.shields.io/npm/v/ec2-sns.svg)](https://www.npmjs.com/package/ec2-sns)\n[![Travis build status](https://travis-ci.org/jaaaco/ec2-sns.svg?branch=master)](https://travis-ci.org/jaaaco/ec2-sns/) \n[![Coveralls](https://img.shields.io/coveralls/jaaaco/ec2-sns.svg)](https://coveralls.io/github/jaaaco/ec2-sns)\n\n# EC2 SNS Client\n\nAWS SNS Client that:\n* automatically subscribes to SNS topic, \n* gets endpoint URL from EC2 instance public IP\n\nDesigned to run in AWS ECS / Docker environment.\n\n## Usage\n\n```\nconst SNS = require('ec2-sns');\nconst sns = new SNS({\n  port: 8081 // default port\n});\n\n// receive messages from SNS Topic\nsns.on('message', message =\u003e {\n  console.log('Subject', message.subject);\n  console.log('Body', message.body); // must be JSON\n});\n\n// send message to SNS Topic\nsns.on('ready', () =\u003e {\n  sns.send({\n    subject: 'my-subject',\n    message: {foo: 'bar'}\n  });\n});\n\n```\n\n## Environment variables \n\n* AWS_ACCESS_KEY_ID\n* AWS_SECRET_ACCESS_KEY\n* AWS_TOPIC_ARN (SNS topic has to be created first)\n* AWS_REGION (optional, defaults to eu-west-1)\n* AWS_SUBSCRIPTION_ENDPOINT (optional, overrides automatic one)\n* NO_SUBSCRIPTION (optional) if set it won't subscribe, but still can send messages to SNS Topic\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaaaco%2Fec2-sns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjaaaco%2Fec2-sns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjaaaco%2Fec2-sns/lists"}