Running Cross-Account Workflows with AWS Step Functions and Amazon API Gateway
aws.amazon.com
aws.amazon.com
Don't forget to setup your AWS billing alarms using AWS Budgets plus AWS Budget Actions. A standard best practice in any case.
Also enforce timeouts at the State Machine level:
https://docs.aws.amazon.com/step-functions/latest/dg/amazon-...
The reason being that, for a Lambda function, and independently of your execution logic, the Lambda execution in any case terminates, ( depending on configuration), in the worst case after 15 min. So also terminates the corresponding billing for that execution also.
With Step Functions or similar orchestration, a logic error could expose you to create an infinite loop of continuous invocations and the corresponding never ending growing invoice accompanying it :-)
Seems like the “normal” way I’d go about this would be someone sets up a server, I ping it with token auth that’s been provided, thing happens. Now instead of doing auth through headers we require both parties to be on AWS to use their auth magic?
Guess it could be useful if both organizations are within the same company, so you can just enable app-to-app auth. No one is probably worried about cloud vendor compatibility in that case. No diss on it, but it seems kinda niche?
Am I right to think that if you don't want to do some "no code" weirdness, they're just not for you?
Because deploying a thing I can't store in source control looks like insanity to me.
In terms of source control, the step function definition is just JSON (IIRC). I deployed it with CDK so the structure of the step function, its metadata, permissions etc. were all in source control. AWS docs like this tend to show things done in either the web UI or the CLI, but generally you can use an infrastructure-as-code solution instead.
Also the local testing experience is surprisingly good: there's a stepfunctions-local by Amazon and I think that's used by localstack too (which is what I used).
> "aws:SourceArn": ["<SourceAccountStateMachineARN>"]
I can’t think of any. Maybe a train / rail network?