$30 off During Our Annual Pro Sale. View Details »

Effective AWS Step Functions

Effective AWS Step Functions

haruharuharuby

September 10, 2022
Tweet

More Decks by haruharuharuby

Other Decks in Technology

Transcript

  1. Effective Step Functions Tomoharu Ito https://hugtech.io

  2. Agenda 1. Lambda invoking is often bad. 2. The new

    process with WorkflowStudio 3. Point of view for variable injection in CI/CD 4. Design Patterns 5. Use case (Shifter, SAML integration workflow)
  3. 1. Lambda invoking is often bad.

  4. 1. [Problem] sometimes hard to see your logic. packed in..

    - Transcribe:StartBatchJob - WaitJobComplete - SNS:Publish - SES:SendEmail - DynamoDB: UpdateItem : return FALLBACK?
  5. 1. [Solution] Extract Lambda by SDK integration

  6. Eliminate Lambda (as much as possible). Express (and don’t hide)

    your logic on your StateMachine.
  7. 2. The new process and benefit for WorkflowStudio Prototype first.

    Business logic first.
  8. 2. Circulation your workflow Console and Repository

  9. 2. Alteration ASL easy on the Workflow Studio (1) Handling

    all the exceptions.
  10. Output modification. 2. Alteration ASL easy on the Workflow Studio

    (2)
  11. Don’t needed write ASL direct. Designing isolated In/Out. Mutually exclusive

    errors and fallbacks.
  12. 3. Point of view for variable injection in CI/CD

  13. 3. Pulling variables in the workflow SSM:GetParameters on top of

    Workflow.
  14. 3. Inject variables from AWS-SAM

  15. 3. [Recommended Way] Inject variables from AWS-SAM Reset injected values

    to inside Workflow as variables on top.
  16. Refer them as workflow parameters. 3. [Recommended Way] Inject variables

    from AWS-SAM
  17. Manage credential on the single point. Dynamic or static more

    suitable in your use-case .
  18. 4. Design Patterns Exception Handler Catching all exceptions

  19. 4. Design Patterns Delaying operation in StateMachine. Delay

  20. 4. Design Patterns Run different operation depending on StateMachine input.

    Action & Choice
  21. 4. Design Patterns Avoid StateMachine Nesting with EventBridge. Flatten

  22. 4. Design Patterns Real time notification from StateMachine. Async Notification

  23. 5. Use case (Shifter, SAML integration workflow)

  24. Switch operation per phase in a workflow

  25. None
  26. None
  27. More traceability comes from SDK integration.

  28. Monitoring performance by default with X-Ray.

  29. Thanks for listening everyone. See you at the next meetup.