Skip to content

Instantly share code, notes, and snippets.

@djg07
Last active August 16, 2022 22:08
Show Gist options
  • Save djg07/e85e9030fd1809531089ccddd9886c84 to your computer and use it in GitHub Desktop.
Save djg07/e85e9030fd1809531089ccddd9886c84 to your computer and use it in GitHub Desktop.
import json
import boto3
import uuid
client = boto3.client('stepfunctions')
def lambda_handler(event, context):
#INPUT -> { "TransactionId": "foo", "Type": "PURCHASE"}
transactionId = str(uuid.uuid1()) #90a0fce-sfhj45-fdsfsjh4-f23f
input = {'TransactionId': transactionId, 'Type': 'PURCHASE'}
response = client.start_execution(
stateMachineArn='YOUR ARN HERE!',
name=transactionId,
input=json.dumps(input)
)
@arijitslg1
Copy link

arijitslg1 commented Jun 12, 2021

You mentioned - "stateMachineArn='YOUR ARN HERE!'"
Which ARN are you referring? Do you have a video reference so that I can watch on this like your other demos?
is this the one - https://www.youtube.com/watch?v=s0XFX3WHg0w&list=PL9nWRykSBSFjodfc8l8M8yN0ieP94QeEL&index=6&t=35s

@hosamshahin
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment