AWS CDK Step Functions

CDK app providing API Gateway endpoint to provision a CloudFormation stack. Endpoint is backed by step function that initiates the create-stack and polls (describe-stack) on an interval for completion.

This can be used as a backend to provision a AWS CloudFormation Custom Resource Type that itself is backed by a set of AWS services.

see CDK stack components at lib/aws-cdk-step-functions-playground-stack.ts

Architecture


Dependencies

Demo

# install deps
npm install

# deploy
cdk deploy  --force --require-approval never

# test with IAM auth (aws sigv4 request)
awscurl --service execute-api -X POST https://7t0zeiul1l.execute-api.us-east-1.amazonaws.com/prod/ -d '{"foo": "bar"}'

Welcome to your CDK TypeScript project!

This is a blank project for TypeScript development with CDK.

The cdk.json file tells the CDK Toolkit how to execute your app.

Useful commands

  • npm run build compile typescript to js
  • npm run watch watch for changes and compile
  • npm run test perform the jest unit tests
  • cdk deploy deploy this stack to your default AWS account/region
  • cdk diff compare deployed stack with current state
  • cdk synth emits the synthesized CloudFormation template