https://www.davehall.com.au/blog/2020/07/10/logging-step-functions-cloudwatch/ AWSTemplateFormatVersion: ‘2010-09-09’ Description: StepFunction with Logging Example. Parameters: Resources: StepFunctionExecRole: Type: AWS::IAM::Role Properties: AssumeRolePolicyDocument: Version: ‘2012-10-17’ Statement: – Effect:
Tag: Step Function
Step function notes
Use step function to delay sns { “StartAt”: “Delay”, “Comment”: “Publish to SNS with delay”, “States”: { “Delay”: { “Type”:
Step function history event limitation
One approach to avoid the 25k history event limit is to add a choice state in your loop that takes
Step function wait 10 seconds after current time
{ “StartAt”: “Wait”, “States”: { “Wait”: { “Type”: “Wait”, “Seconds”: { “Value”: { “Fn::Sub”: “${current_time} + 10” } }, “Next”:
Lambda executing step function nodejs example
var aws = require(‘aws-sdk’) exports.handler = (event, context, callback) => { var params = { stateMachineArn: ‘arn:aws:states:us-east-1:1234567890:stateMachine:Helloworld’, input: JSON.stringify({}) };
Step function possible states
There are 7 possible states in a Step Function: Task: A Task state represents a single unit of work performed
Lambda example sending task succeeded status back to step function
const AWS = require(‘aws-sdk’); exports.handler = async (event, context) => { // Get the Step Functions client. const stepFunctions =
Lambda invoke step function nodejs example
const AWS = require(‘aws-sdk’); exports.handler = async (event, context) => { // Get the Step Functions client. const stepFunctions =
Step function and async lambda
Example project with async lambda and dynamo db Step function invoke lambda with the wiatforTaskToken method The async lambda can
Step Function and lambda
Avoid reaching history quota Tutorial for creating lambda and step function that invokes it Invoke syntax, parameter and payload Supported