{"id":22468560,"url":"https://github.com/projectweekend/aws-sns-lambda-demo","last_synced_at":"2025-03-27T15:44:47.570Z","repository":{"id":76097560,"uuid":"53142136","full_name":"projectweekend/aws-sns-lambda-demo","owner":"projectweekend","description":null,"archived":false,"fork":false,"pushed_at":"2016-04-05T18:35:34.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-01T19:29:54.852Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/projectweekend.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-03-04T14:48:50.000Z","updated_at":"2017-10-13T17:20:01.000Z","dependencies_parsed_at":"2023-03-03T02:46:06.382Z","dependency_job_id":null,"html_url":"https://github.com/projectweekend/aws-sns-lambda-demo","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/projectweekend%2Faws-sns-lambda-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Faws-sns-lambda-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Faws-sns-lambda-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Faws-sns-lambda-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectweekend","download_url":"https://codeload.github.com/projectweekend/aws-sns-lambda-demo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245874233,"owners_count":20686728,"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-12-06T11:17:27.638Z","updated_at":"2025-03-27T15:44:47.564Z","avatar_url":"https://github.com/projectweekend.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aws-sns-lambda-demo\n\n\n### Step 1: Create local files\n\nLambda function code is organized in the `./lambdas` directory. Each Lambda lives in its own subdirectory of that directory. The name of the subdirectory should be lowercase and use `_` to separate words. Example: `my_cool_lambda`.\n\n\n### Step 2: Create SNS Topic\n\nFrom the [SNS Console](https://console.aws.amazon.com/sns/v2/home) \u003e Topics, click **Create new topic**. Enter a **Topic name**, using `-` to separate words. Example: `my-cool-topic`.\n\n\n### Step 3: Create Lambda Function\n\nFrom the [Lambda Console](https://console.aws.amazon.com/lambda/home), click **Create a Lambda function**. Select **Python 2.7** from the languages filter to limit results, then choose the **sns-message-python** blueprint. Click in the **SNS topic** field and select the topic created in the previous step, click **Next**. Give your function the same name you used in **Step 1**. Example: `my_cool_lambda`. Copy the starter code from the editor panel and paste it into a `main.py` file in your local Lambda directory (See **Step 1**). In the **Handler** field, change the value to `main.lambda_handler`. Choose the basic execution role in the **Role** dropdown. Click **Next**. Review information on the final screen and confirm.\n\n\n### Step 4: Deploy with Fabric\n\nAfter modifying the handler code locally, you can deploy with a Fabric command:\n```\nfab --set AWS_ACCESS_KEY_ID=YOUR_AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET_KEY deploy_lambda:name_of_lambda\n```\nReplace `name_of_lambda` above with the name you used in **Step 1**. It is important that this name matches the subdirectory name in `./lambdas` because that's how the Fabric script finds the local files to zip and push to AWS.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Faws-sns-lambda-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectweekend%2Faws-sns-lambda-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Faws-sns-lambda-demo/lists"}