How we made Step Functions call any AWS service locally
If you've used AWS Step Functions, you know the aws-sdk:* integration pattern: { "Type": "Task", "Resource": "arn:aws:states:::aws-sdk:dynamodb:PutItem", "Parameters": { "TableName": "my-table", "I...

Source: DEV Community
If you've used AWS Step Functions, you know the aws-sdk:* integration pattern: { "Type": "Task", "Resource": "arn:aws:states:::aws-sdk:dynamodb:PutItem", "Parameters": { "TableName": "my-table", "Item": { "pk": { "S.quot;: "$.id" } } } } One line in your state machine, and Step Functions calls DynamoDB directly. No Lambda wrapper needed. AWS recommends this for all new workflows. The problem? Every local AWS emulator hardcodes service integrations. Want SQS? There's a handler. Want SNS? Another handler. Want SecretsManager? Sorry, not implemented yet. The generic dispatcher We added a generic aws-sdk:* task dispatcher to MiniStack. Instead of writing a handler for each service, it routes to whatever service is already emulated: arn:aws:states:::aws-sdk:secretsmanager:CreateSecret β SecretsManager handler arn:aws:states:::aws-sdk:dynamodb:PutItem β DynamoDB handler arn:aws:states:::aws-sdk:ecs:RunTask β ECS handler arn:aws:states:::aws-sdk:kms:Encrypt β KMS handler 38 services. All callabl