{"id":20399131,"url":"https://github.com/nolim1t/aws-lambda-sns","last_synced_at":"2026-06-23T23:30:53.510Z","repository":{"id":66826464,"uuid":"43343054","full_name":"nolim1t/aws-lambda-sns","owner":"nolim1t","description":"Explorings using AWS Lambda SNS to push stuff","archived":false,"fork":false,"pushed_at":"2015-09-30T01:27:38.000Z","size":168,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T01:25:08.966Z","etag":null,"topics":[],"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/nolim1t.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}},"created_at":"2015-09-29T03:38:12.000Z","updated_at":"2015-09-29T03:40:44.000Z","dependencies_parsed_at":"2023-03-05T08:15:17.178Z","dependency_job_id":null,"html_url":"https://github.com/nolim1t/aws-lambda-sns","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/nolim1t/aws-lambda-sns","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolim1t%2Faws-lambda-sns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolim1t%2Faws-lambda-sns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolim1t%2Faws-lambda-sns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolim1t%2Faws-lambda-sns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nolim1t","download_url":"https://codeload.github.com/nolim1t/aws-lambda-sns/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nolim1t%2Faws-lambda-sns/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34711176,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-23T02:00:07.161Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":[],"created_at":"2024-11-15T04:27:11.402Z","updated_at":"2026-06-23T23:30:53.492Z","avatar_url":"https://github.com/nolim1t.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-lambda-sns Examples\n## About\nExplorings using AWS Lambda SNS to push stuff\n\n## Disclaimer\nIt's my first time with lambda. Proceed with caution\n\n## Apple's push notification docs\nhttps://developer.apple.com/library/ios/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/Chapters/ApplePushService.html\n\n## AWS IAM Policy\n\nMake sure you grant write permissions to the lambda role\n\n```\n{\n    \"Version\": \"2012-10-17\",\n    \"Statement\": [\n        {\n            \"Sid\": \"Stmt1443521471000\",\n            \"Effect\": \"Allow\",\n            \"Action\": [\n                \"sns:CreatePlatformEndpoint\",\n                \"sns:Publish\"\n            ],\n            \"Resource\": [\n                \"arn:aws:sns:*:*:*\"\n            ]\n        }\n    ]\n}\n```\n\n## How it processes stuff\nProcesses payloads in the following format:\n\n```javascript\nvar lambdapayload = JSON.stringify({\n    message: 'Hello World',\n    custom: {\n        senderid: 'testsenderid',\n        recipientid: 'testrecipient',\n        recipientname: 'Test Recipientname',\n        messageid: 'testmsgid',\n        devicetoken: 'token',\n        deviceplatform: 'ios'\n    }\n});\n```\n\n## To send the above\n**Note** You may have to configure your own key and stuff. \n\n```javascript\nvar sns = new AWS.SNS()\nvar messagepayload = JSON.stringify({\n    default: 'This is a default message',\n    lambda: lambdapayload\n});\nvar params = {\n    Message: messagepayload,\n    MessageStructure: 'json',\n    TopicArn: 'YOURARNHERE'\n};\nsns.publish(params, function(err,data) {\n    console.log(err);\n    console.log(data);\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnolim1t%2Faws-lambda-sns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnolim1t%2Faws-lambda-sns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnolim1t%2Faws-lambda-sns/lists"}