This directory contains the AWS step function definition used by the smart-security-camera project. The step function orchestrates calls to the Node.js based AWS Lambda Functions.
At the time of writing it is not possible to edit a step function once it is created. Therefore you should always keep a backup copy of any changes.
- step-function-image-processing-nodejs.json - Process definition for step function.
- step-function-image-processing-nodejs.jpg - Visual representation of step function generated by AWS.
Normally AWS will generate a role for you, but if it doesn't then you can use the AWS IAM Console create an IAM Role containing the "AWSLambdaRole" permission. This will allow your state machine to call AWS Lambda Functions.
This is done from the Step Function Console. Note that Amazon uses 'State Machine' and 'Step Function' interchangebly.
Creating the step function is trivial - you basically copy the contents of the JSON file into the wizard. The following tips might save your some time:
- Define your AWS Lambda Functions before starting with the step function.
- Make sure that you note the arn of your Step Function. This will be used in the s3-trigger-image-processing function.
- Make sure the correct arn values are used in the Resource values. The arn value for each Lambda Function is visible in the top right hand corner of the screen when viewing a Lambda Function definition.
- Make sure also that the region is correctly set. This needs to point to the region where your Lambda Functions are uploaded.