Slide 1

Slide 1 text

Marek Kuczyński Serverless Engineer @ Stedi Twitter: @marekq What's new with AWS Step Functions?


Slide 2

Slide 2 text

@marekq In this session… • About Stedi • What are Step Functions? • Why are they so exciting? • Practical tips and tricks • Q&A

Slide 3

Slide 3 text

About Stedi • Stedi is rebuilding the technological backbone of the B2B economy. • Trillions of dollars fl ow annually through a global network of commerce via an archaic framework called EDI. • Our goal is to make B2B transactions easier and more accessible. Orders Invoices Orders Invoices Retailer Distribution Producer

Slide 4

Slide 4 text

@marekq How we make EDI easier to use Source: https://edi.stedi.com/inspector

Slide 5

Slide 5 text

@marekq Why do we like serverless at Stedi? • The EDI business is very event driven by nature • We o ff er a “pay as you go” model for services to our customers • AWS services improve over time and new features are added • It’s really nice to have 0 instances to worry about!!

Slide 6

Slide 6 text

@marekq Let’s talk about Step Functions 6

Slide 7

Slide 7 text

@marekq What are AWS Step Functions? • AWS Step Functions is a low-code visual work fl ow service • Allows you to control which step should execute when in a work fl ow. • You can easily add retries, branches, choice states, parallel states etc. • A cool AWS example; https://github.com/ aws-samples/lambda-refarch- imagerecognition

Slide 8

Slide 8 text

@marekq How Marek uses Step Functions For my blog at https://www.coldstart.dev Source: https://github.com/marekq/rss-lambda

Slide 9

Slide 9 text

@marekq Three exciting new features 9

Slide 10

Slide 10 text

@marekq #1 - The new Workflow Studio Let me just show you… 10

Slide 11

Slide 11 text

@marekq #2 - Step Functions direct AWS SDK Integration • You can make direct API requests to over 200 AWS services now! • A few examples; • Read a record from a DynamoDB table • Upload a new JSON object to a S3 bucket • Put an event to EventBridge or SNS • You can o ff l oad the logic for the requests to Step Functions directly https://aws.amazon.com/about-aws/whats-new/2021/09/aws-step-functions-200- aws-sdk-integration/

Slide 12

Slide 12 text

@marekq What changed? Now: Lambda for some tasks Before: Lambda for everything * 12

Slide 13

Slide 13 text

@marekq

Slide 14

Slide 14 text

@marekq Getting a DynamoDB record using CDK That’s it, no Lambda function required! Getting a DynamoDB record using CDK 14

Slide 15

Slide 15 text

@marekq Making any other SDK request to AWS 15

Slide 16

Slide 16 text

@marekq Creating a State Machine in CDK Full CDK sample: https://github.com/marekq/cdk-api-stepfunction 16

Slide 17

Slide 17 text

@marekq #3 - Monitoring your workflows became easier • X-Ray tracing can be enabled with one line in CDK. • You can con fi gure CloudWatch logging for all events. • Express Step Function captures several helpful metrics.

Slide 18

Slide 18 text

@marekq What’s next?

Slide 19

Slide 19 text

@marekq Thanks!