Stepping Up Your DevOps With
Step Functions
HELLO!
I’m Richard Boyd
I’m a Senior Technical Account Manager at AWS.
You can find me at:
@richardboydii
or
https://richardboydii.com
2
What I’ll Discuss
○ How I Solved a Problem
○ Serverless and Step Functions, Briefly
○ A Pattern for Re-using Lambdas
○ How Step Functions Work
○ Demo Time
3
Part 1 - How I Solved a
Problem
And stumbled across a solution that
expanded my horizons
The Problem
MS SQL database dump is
put in an S3 bucket
5
1
MS SQL database dump is
put in an S3 bucket
2
DB access needs to be
restored from AD
3
The EDW Team needs to
be informed
4
The Solution
6
What is Serverless
○ Serverless is a fancy buzzword that means
your code runs in a short-lived execution
environment (in a container)
○ There are still servers, but you don’t have
to worry about them (someone else will,
maybe)
○ Your code executes in response to events
7
Part 2 - Serverless and
Step Functions, Briefly
A quick overview before we dive in in the
next two sections
Lamb(da) Dissection
9
Step Functions
10
Part 3 - A Pattern for
Reusing Lambdas
Build them for scale and composability
using this approach
Unix-Like Lambdas
○ Most serverless frameworks (SAM,
Spartan, Serverless) focus on creating an
application with other components
○ When it comes to operations-oriented
Lambdas, you need to build them with a
Unix mindset
12
Build it Like a Function
13
Part 4 - How Step
Functions Work
Build them for scale and composability
using this approach
What is a State Machine
○ A Finite State Machine can express an
algorithm as a number of states, their
relationships, and their input and output
○ That’s a mouthful and very mathy
○ Instead, let’s make it more simple
15
Something More Concrete
16
Express a business process as a logical
sequence of automated steps
States
Each step in defines the
action to take and what
step to go to next
State Machine Components
Tasks
The things that do your
work, can be Lambdas or
Activities (daemons that
run on your
infrastructure
17
Part 5 - Demo Time
Tying it all together
The Setup
○ We’re going to use several Lambdas in a
Step Function
○ We’ll use an invoking Lambda to build our
data structure
○ The data structure will drive the rest of the
Step Function execution
19
The Architecture
20
The Setup
Demo Gods be kind ...
21
THANKS!
Any questions?
You can find me at:
@richardboydii
https://richardboydii.com
22

Stepping Up Your DevOps With Step Functions

  • 1.
    Stepping Up YourDevOps With Step Functions
  • 2.
    HELLO! I’m Richard Boyd I’ma Senior Technical Account Manager at AWS. You can find me at: @richardboydii or https://richardboydii.com 2
  • 3.
    What I’ll Discuss ○How I Solved a Problem ○ Serverless and Step Functions, Briefly ○ A Pattern for Re-using Lambdas ○ How Step Functions Work ○ Demo Time 3
  • 4.
    Part 1 -How I Solved a Problem And stumbled across a solution that expanded my horizons
  • 5.
    The Problem MS SQLdatabase dump is put in an S3 bucket 5 1 MS SQL database dump is put in an S3 bucket 2 DB access needs to be restored from AD 3 The EDW Team needs to be informed 4
  • 6.
  • 7.
    What is Serverless ○Serverless is a fancy buzzword that means your code runs in a short-lived execution environment (in a container) ○ There are still servers, but you don’t have to worry about them (someone else will, maybe) ○ Your code executes in response to events 7
  • 8.
    Part 2 -Serverless and Step Functions, Briefly A quick overview before we dive in in the next two sections
  • 9.
  • 10.
  • 11.
    Part 3 -A Pattern for Reusing Lambdas Build them for scale and composability using this approach
  • 12.
    Unix-Like Lambdas ○ Mostserverless frameworks (SAM, Spartan, Serverless) focus on creating an application with other components ○ When it comes to operations-oriented Lambdas, you need to build them with a Unix mindset 12
  • 13.
    Build it Likea Function 13
  • 14.
    Part 4 -How Step Functions Work Build them for scale and composability using this approach
  • 15.
    What is aState Machine ○ A Finite State Machine can express an algorithm as a number of states, their relationships, and their input and output ○ That’s a mouthful and very mathy ○ Instead, let’s make it more simple 15
  • 16.
    Something More Concrete 16 Expressa business process as a logical sequence of automated steps
  • 17.
    States Each step indefines the action to take and what step to go to next State Machine Components Tasks The things that do your work, can be Lambdas or Activities (daemons that run on your infrastructure 17
  • 18.
    Part 5 -Demo Time Tying it all together
  • 19.
    The Setup ○ We’regoing to use several Lambdas in a Step Function ○ We’ll use an invoking Lambda to build our data structure ○ The data structure will drive the rest of the Step Function execution 19
  • 20.
  • 21.
    The Setup Demo Godsbe kind ... 21
  • 22.
    THANKS! Any questions? You canfind me at: @richardboydii https://richardboydii.com 22