Created
May 1, 2022 16:37
-
-
Save t04glovern/74d1658e84c0aa6878f3af160e42ee88 to your computer and use it in GitHub Desktop.
AWS Greengrass Development Kit Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python3 -m pip install -U git+https://github.com/aws-greengrass/aws-greengrass-gdk-cli.git@v1.1.0 | |
gdk component build | |
gdk component publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"component": { | |
"com.devopstar.Test": { | |
"author": "Nathan Glover", | |
"version": "NEXT_PATCH", | |
"build": { | |
"build_system": "zip" | |
}, | |
"publish": { | |
"bucket": "greengrass-component-artifacts", | |
"region": "ap-southeast-2" | |
} | |
} | |
}, | |
"gdk_version": "1.1.0" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
RecipeFormatVersion: "2020-01-25" | |
ComponentName: "{COMPONENT_NAME}" | |
ComponentVersion: "{COMPONENT_VERSION}" | |
ComponentDescription: AWS IoT Greengrass component Test | |
ComponentPublisher: "{COMPONENT_AUTHOR}" | |
ComponentConfiguration: | |
DefaultConfiguration: | |
accessControl: | |
aws.greengrass.ipc.pubsub: | |
com.devopstar.Test:pubsub:1: | |
policyDescription: Allows access to subscribe to all topics. | |
operations: | |
- aws.greengrass#SubscribeToTopic | |
resources: | |
- devopstar/Test/stats | |
Manifests: | |
- Name: Linux | |
Platform: | |
os: linux | |
Artifacts: | |
- URI: "s3://BUCKET_NAME/COMPONENT_NAME/COMPONENT_VERSION/Test.zip" | |
Unarchive: ZIP | |
Lifecycle: | |
Install: | |
Script: pip3 install -r {artifacts:decompressedPath}/Test/requirements.txt | |
RequiresPrivilege: False | |
Run: python3 {artifacts:decompressedPath}/Test/src/main.py |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment