2 Antworten
- Neueste
- Die meisten Stimmen
- Die meisten Kommentare
1
I think the IAM role of your pre-provisioning hook Lambda may be missing a permission. IoT needs permission to invoke the function.
Some good information here in this workshop: https://iot-device-management.workshop.aws/en/provisioning-options/fleet-provisioning.html#optional-pre-provisioning-hook
At this step:
aws lambda add-permission --statement-id $(date '+%Y%m%d%H%M%S') \
--principal iot.amazonaws.com \
--action lambda:InvokeFunction \
--function-name [YOUR_LAMBDA_FUNCTION_NAME]
0
this is for serverless
functions:
preprovisioning:
name: preprovisioning
handler: functions/preprovisioning.lambda_handler
timeout: 100
resources:
Resources:
PermissionToCallHookLambda:
Type: "AWS::Lambda::Permission"
Properties:
Action: lambda:InvokeFunction
FunctionName: preprovisioning
Principal: "iot.amazonaws.com"
beantwortet vor 2 Jahren
Relevanter Inhalt
- AWS OFFICIALAktualisiert vor einem Jahr
- AWS OFFICIALAktualisiert vor 2 Jahren
- AWS OFFICIALAktualisiert vor einem Jahr
I added that permission in the lambda execution role instead