ryands17/step-function-sync-workflow
Synchronous Express Workflows for AWS Step Functions via API Gateway
Synchronous Express Workflows for AWS Step Functions
This project contains a Step Function Express workflow which will be called synchronously via an API endpoint defined in API Gateway.
This example is taken from the docs which detects the sentiment of the user that filled a feedback form and notifies via Email in case of a negative sentiment.
This deployment might incur some costs if not in the Free Tier so it's best to destroy after you've played with it.
Steps
-
Run
yarn(recommended) ornpm install -
Rename
.example.envto.envand replace the values with your configuration. The emails are mandatory and need to be verified in SES as you wouldn't be able to send emails. -
Run
yarn cdk deploy --allto deploy the stack. -
Run
yarn cdk destroy --allto delete all resources
The cdk.json file tells the CDK Toolkit how to execute your app.
Useful commands
yarn buildcompile typescript to jsyarn watchwatch for changes and compileyarn testperform the jest unit testsyarn cdk deploydeploy this stack to your default AWS account/regionyarn cdk diffcompare deployed stack with current stateyarn cdk synthemits the synthesized CloudFormation template