-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathrecipe.yaml
More file actions
31 lines (31 loc) · 1.18 KB
/
recipe.yaml
File metadata and controls
31 lines (31 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# recipe reference: https://docs.aws.amazon.com/greengrass/v2/developerguide/component-recipe-reference.html
---
RecipeFormatVersion: "2020-01-25"
ComponentName: com.example.greengrass_ipc.python.pubsub_cloud
ComponentVersion: "1.0.0"
ComponentDescription: Greengrass IPC SDK component example
ComponentPublisher: Amazon
ComponentConfiguration:
DefaultConfiguration:
accessControl:
# see https://docs.aws.amazon.com/greengrass/v2/developerguide/ipc-iot-core-mqtt.html
"aws.greengrass.ipc.mqttproxy":
"com.example.greengrass_ipc.python.pubsub_cloud:mqttproxy:1":
policyDescription: Allow access to publish/subscribe to all topics on AWS IoT Core.
operations:
- "aws.greengrass#PublishToIoTCore"
- "aws.greengrass#SubscribeToIoTCore"
resources:
- "*" # CHANGE ME: scope down based on principle of least privilege
Manifests:
- Platform:
os: linux
Lifecycle:
Install:
RequiresPrivilege: true
Script: |
apt-get update
apt-get install --yes python3 python3-pip
python3 -m pip install "awsiotsdk>=1.15.0"
Run: |
python3 -u {artifacts:path}/code.py