{"id":30652538,"url":"https://github.com/daaru00/serverless-plugin-greengrass","last_synced_at":"2025-10-11T18:19:06.350Z","repository":{"id":36912122,"uuid":"230900764","full_name":"daaru00/serverless-plugin-greengrass","owner":"daaru00","description":"Serverless plugin to deploy functions to Greengrass Group","archived":false,"fork":false,"pushed_at":"2022-02-12T21:39:22.000Z","size":193,"stargazers_count":4,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-08T15:54:30.100Z","etag":null,"topics":["aws","greengrass","iot","severless-framework"],"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/daaru00.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":"2019-12-30T11:05:58.000Z","updated_at":"2020-10-21T01:13:49.000Z","dependencies_parsed_at":"2022-08-08T18:16:41.748Z","dependency_job_id":null,"html_url":"https://github.com/daaru00/serverless-plugin-greengrass","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daaru00/serverless-plugin-greengrass","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaru00%2Fserverless-plugin-greengrass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaru00%2Fserverless-plugin-greengrass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaru00%2Fserverless-plugin-greengrass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaru00%2Fserverless-plugin-greengrass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daaru00","download_url":"https://codeload.github.com/daaru00/serverless-plugin-greengrass/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daaru00%2Fserverless-plugin-greengrass/sbom","scorecard":{"id":316195,"data":{"date":"2025-08-11","repo":{"name":"github.com/daaru00/serverless-plugin-greengrass","commit":"d0121c9b5ed7bce269fdae507c5d48411151a7e8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"17 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-6chw-6frg-f759","Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-43f8-2h32-f4cj","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-52f5-9888-hmc6","Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T00:13:51.082Z","repository_id":36912122,"created_at":"2025-08-18T00:13:51.082Z","updated_at":"2025-08-18T00:13:51.082Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279008299,"owners_count":26084429,"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-10-11T02:00:06.511Z","response_time":55,"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":["aws","greengrass","iot","severless-framework"],"created_at":"2025-08-31T07:02:49.027Z","updated_at":"2025-10-11T18:19:06.334Z","avatar_url":"https://github.com/daaru00.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serverless Greengrass\n\n[![npm](https://img.shields.io/npm/v/serverless-plugin-greengrass.svg)](https://www.npmjs.com/package/serverless-plugin-greengrass)\n\nA [serverless](https://serverless.com) plugin to deploy functions to Greengrass Group.\n\nThis plugin will create: \n- New [AWS::Greengrass::FunctionDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-functiondefinition-function.html) with project's Lambdas declared. \n- New [AWS::Greengrass::SubscriptionDefinition](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscription.html) with project's events subscriptions. \n- New [AWS::Greengrass::GroupVersion](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-greengrass-groupversion.html) to associate the new Function Definition with your existing Greengrass Group. Deploy phase will trigger a new deployment with the new Group Version declared.\n\n## Requirements\n\nCreate a Greengrass Group and a Greengrass Core and configure your device to connect to it.\n\n## Usage\n\n### Installation\n\n```bash\n$ npm install serverless-plugin-greengrass --save-dev\n```\nor using yarn\n```bash\n$ yarn add serverless-plugin-greengrass\n```\n\nAdd this plugin to your `serverless.yml` file:\n```yaml\nplugins:\n  - serverless-plugin-greengrass\n```\n\n### Configuration\n\nMinimal required configuration:\n```yaml\ncustom:\n  greengrass:\n    groupId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # Greengrass Group id\n\nfunctions:\n  myfunction:\n    handler: tasks/door.handler\n```\n*(in order to retrieve group id got to AWS Console, then got to \"IoT Greengrass\" service, select the Greengrass Groups and under \"Setting\" menu you will find the \"Group ID\" section)*\n\nAdvanced configuration:\n```yaml\ncustom:\n  greengrass:\n    autoDeploy: true # set to \"false\" to disable automatic deploy after \"sls deploy\"\n    deployTimeout: 30 # deploy timeouts in seconds, default 30\n    groupId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n    defaults:\n      pinned: false # check if is a long running or on-demand\n      memorySize: 16384,  # 16 MB expressed in KB\n      timeout: 6 # function timeout\n      encodingType: json # The expected encoding type of the input payload, can be binary or json.\n      accessSysfs: false # allowed to access the host's /sys folder\n      environment: \n        myVarA: 'myValueA' # deployed to Greengrass for all functions\n    \nfunctions:\n  myfunction:\n    handler: tasks/door.handler\n    greengrass:\n      handler: tasks/door.handlerIot # override handler for Greengrass deployed function\n      pinned: true # override default values\n      environment: \n        myVarC: 'myValueC' # deployed to Greengrass only for this function\n```\nPlease note: `memorySize` must be expressed in KB (unlike normal Lambdas expressed in MB) and greater or equal to 2048 (2MB). For more infos check [FunctionConfiguration documentation](https://docs.aws.amazon.com/greengrass/latest/apireference/definitions-functionconfiguration.html).\n\n\nInclude only specific functions:\n```yaml\ncustom:\n  greengrass:\n    groupId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n    include:\n      - myfunctionA # Only function \"myfunctionA\" will be deployed to Greengrass\n\nfunctions:\n  myfunctionA:\n    handler: tasks/door.handler\n  myfunctionB:\n    handler: tasks/door.handler\n  myfunctionC:\n    handler: tasks/door.handler\n```\n\nExclude functions:\n```yaml\ncustom:\n  greengrass:\n    groupId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n    exclude:\n      - myfunctionB # Only function \"myfunctionA\" and \"myfunctionC\" will be deployed to Greengrass\n\nfunctions:\n  myfunctionA:\n    handler: functions/myfunctionA.handler\n  myfunctionB:\n    handler: functions/myfunctionB.handler\n  myfunctionC:\n    handler: functions/myfunctionC.handler\n```\n\nFunctions resources ids and permissions (locals / machine learning / secret):\n```yaml\ncustom:\n  greengrass:\n    groupId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n    defaults:\n      resources: # available for all functions\n        - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:ro # resource id with only read permission\n        - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx # only, resource id, permission by default will be \"ro\"\n\nfunctions:\n  myfunctionA:\n    handler: tasks/door.handler\n    greengrass:\n      resources:\n        - xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx:rw # resource id with read and write permission\n```\nin order to retrieve the resource id got to AWS Console, then got to \"IoT Greengrass\" service, select the Greengrass Groups and under \"Resources\" menu you will find all available resources. Select resource you want to add and grab the last part of URL:\n`https://\u003cyour region\u003e.console.aws.amazon.com/iot/home?region=\u003cyour region\u003e#/greengrass/groups/\u003cyour group id\u003e/resources/\u003cresource id\u003e`\n\nSubscription management:\n```yaml\ncustom:\n  greengrass:\n    groupId: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx\n    subscriptions: # global subscription\n      - source: arn:aws:iot:us-east-1:123456789012:thing/MyLightBulb # a Lambda function ARN, a connector ARN, \"cloud\" or \"GGShadowService\"\n        target: arn:aws:greengrass:us-east-1::/connectors/TwilioNotifications/versions/3\n        subject: /test/topic/\n\nfunctions:\n  myfunctionA:\n    handler: functions/myfunctionA.handler\n    greengrass:\n      subscriptions: # leave target empty to use current function arn\n        - source: \"GGShadowService\"\n          subject: /test/topic/\n  myfunctionB:\n    handler: functions/myfunctionB.handler\n    greengrass:\n      subscriptions: # leave source empty to use current function arn\n        - target: arn:aws:iot:us-east-1:123456789012:thing/MyLightBulb\n          subject: /test/topic/\n  myfunctionC:\n    handler: functions/myfunctionC.handler\n    greengrass:\n      subscriptions: # multiple subscription types are supported\n        - source: arn:partition:service:region:account-id:resource-id\n          subject: /test/topic/a/\n        - target: \"cloud\"\n          subject: /test/topic/b/\n```\nFor more info about subscription value check [AWS documentation](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-greengrass-subscriptiondefinition-subscription.html#cfn-greengrass-subscriptiondefinition-subscription-target).\n\n### Deploy\n\nExecute a simple Serverless deploy, with `autoDeploy` enabled:\n```yaml\ncustom:\n  greengrass:\n    autoDeploy: true # or leave empty\n```\n```bash\n$ serverless deploy\n```\n```\nServerless: Packaging service...\nServerless: Excluding development dependencies...\nGreengrass: Loading functions...               # \u003c--- here plugin will load functions configurations\nGreengrass: Creating new Group Version...      # \u003c--- here add a new Group Version to CloudFormation template\nServerless: Uploading CloudFormation file to S3...\nServerless: Uploading artifacts...\nServerless: Uploading service example.zip file to S3 (2.42 MB)...\nServerless: Validating template...\nServerless: Updating Stack...\nServerless: Checking Stack update progress...\n...............................\nServerless: Stack update finished...           # \u003c--- CloudFormation Stack deployed the new Group Version\nService Information\nGreengrass: Creating new deployment for version xxxxxxxxxx... # \u003c--- here plugin will execute a Greengrass deploy\nGreengrass: Checking deploy progress...\n........................                       # \u003c--- wait until Greengrass deploy is completed\nGreengrass: Deploy successfully executed.      # \u003c--- all functions are deployed to your Greengrass Group\nServerless: Removing old service artifacts from S3...\nServerless: Run the \"serverless\" command to setup monitoring, troubleshooting and testing.\n```\n\nManually execute deploy, with `autoDeploy` disabled: \n```yaml\ncustom:\n  greengrass:\n    autoDeploy: false\n```\n```bash\n$ serverless deploy\n$ serverless greengrass deploy\n```\n\n### Redeploy\n\nTo redeploy latest version run:\n```bash\n$ serverless greengrass redeploy\n```\n\n### Delete/Reset\n\nExecute a simple Serverless remove, with `autoDeploy` enabled:\n```yaml\ncustom:\n  greengrass:\n    autoDeploy: true # or leave empty\n```\n```bash\n$ serverless remove\n```\nthis will also run a reset deployment operations against Greengrass group.\n\nManually execute reset, with `autoDeploy` disabled:\n```yaml\ncustom:\n  greengrass:\n    autoDeploy: false\n```\n```bash\n$ serverless remove\n$ serverless greengrass reset\n```\n\n## Debug\n\nSet `DEBUG` environment variable to \"yes\" to enable debug log:\n```bash\nexport DEBUG=yes\n\n$ serverless greengrass deploy # will be printed a more verbose log\n```\n\n## Extra tips\n\n### Setup Raspberry Pi\n\n1. Download latest version of Raspbian Lite version from [official download page](https://www.raspberrypi.org/downloads/raspbian/)\n2. Extract `.img` file from previously download zip archive\n3. Build SD card using [Etcher](https://www.balena.io/etcher/), selecting previously extracted `.img` file\n4. Mount `boot` partition created on SD card\n5. Create a new file `wpa_supplicant.conf` with you WiFi credentials (edit info between `«`):\n```\nctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev\nupdate_config=1\ncountry=«your_ISO-3166-1_two-letter_country_code»\n\nnetwork={\n    ssid=\"«your_SSID»\"\n    psk=\"«your_PSK»\"\n    key_mgmt=WPA-PSK\n}\n```\n[source](https://raspberrypi.stackexchange.com/questions/10251/prepare-sd-card-for-wifi-on-headless-pi)\n\n6. Create a new empty file `ssh` without extensions in order to enable SSH service\n7. Insert SD card into Raspberry Pi and boot it up\n8. Check into your modem info page a WiFi newly connected device called \"raspberry\" and get the IP\n9. Connect to Raspberry from your computer using SSH\n```bash\nssh pi@\u003craspberry ip\u003e\n```\n10. Login using `raspberry` default password\n11. Install and setup Greengrass:\n```bash\nexport AWS_ACCESS_KEY_ID=«your_access_key»\nexport AWS_SECRET_ACCESS_KEY=«your_secret_access_key»\n\nsudo su\nwget -q -O ./gg-device-setup-latest.sh https://d1onfpft10uf5o.cloudfront.net/greengrass-device-setup/downloads/gg-device-setup-latest.sh \u0026\u0026 chmod +x ./gg-device-setup-latest.sh \u0026\u0026 sudo -E ./gg-device-setup-latest.sh bootstrap-greengrass-interactive\n```\n[source](https://docs.aws.amazon.com/greengrass/latest/developerguide/quick-start.html)\n\n12. Automatically starting AWS Greengrass on a Raspberry Pi on system boot using [this guide](http://www.andyfrench.info/2018/08/automatically-starting-aws-greengrass.html)\n\n## TODO\n\n- [ ] Allow to create and provision a new Greengrass Groups\n- [ ] Deploy to multiple Greengrass Groups\n- [X] Add Greengrass Groups Subscription support\n- [ ] Allow to use resource name instead of id (separated by local, machine learning and secret)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaaru00%2Fserverless-plugin-greengrass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaaru00%2Fserverless-plugin-greengrass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaaru00%2Fserverless-plugin-greengrass/lists"}