[{"data":1,"prerenderedAt":71},["ShallowReactive",2],{"pattern-lambda-sfn-sls":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":12,"deploy":14,"description":18,"extension":19,"framework":20,"gitHub":21,"highlight":6,"introBox":31,"language":35,"level":36,"meta":37,"patternArch":38,"resources":52,"s3URL":6,"services":6,"stem":64,"testing":65,"videoId":6,"__hash__":70},"patterns\u002Fpatterns\u002Flambda-sfn-sls.json","AWS Lambda to AWS Step Functions",null,{"headline":8,"text":9},"Cleanup",[10,11],"1. Delete the stack: \u003Ccode>serverless remove --verbose\u003C\u002Fcode>.","2. Confirm the stack has been deleted: \u003Ccode>aws cloudformation list-stacks --query \"StackSummaries[?contains(StackName,'STACK_NAME')].StackStatus\"\u003C\u002Fcode>",[13],"content\u002Fcontributors\u002Fdmitry-gulin.json",{"text":15},[16,17],"npm install","serverless deploy --verbose","Invoke an AWS Step Functions workflow from AWS Lambda, with logging enabled","json","Serverless Framework",{"template":22,"payloads":27},{"projectFolder":23,"repoURL":24,"templateURL":25,"templateFile":26},"lambda-sfn-sls","https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-sfn-sls","serverless-patterns\u002Flambda-sfn-sls","serverless.yml",[28],{"headline":29,"payloadURL":30},"Sample Lambda payload","lambda-sfn\u002Fevents\u002FinputFile.txt",{"headline":32,"text":33},"How it works",[34],"The Serverless Framework template deploys a Lambda function, a Step Functions Express workflow, a Log group and the IAM resources required to run the application. A Lambda function uses the AWS SDK to asyncronously invoke the Express workflow, passing the event body as a string. The Express Workflow results are logged in Amazon CloudWatch Logs.","TypeScript","200",{},{"icon1":39,"icon2":44,"line1":48},{"x":40,"y":41,"service":42,"label":43},20,50,"lambda","AWS Lambda",{"x":45,"y":41,"service":46,"label":47},80,"sfn","Step Functions",{"from":49,"to":50,"label":51},"icon1","icon2","",{"headline":53,"bullets":54},"Additional resources",[55,58,61],{"text":56,"link":57},"Tutorial: Using AWS Lambda with Amazon S3","https:\u002F\u002Fdocs.aws.amazon.com\u002Flambda\u002Flatest\u002Fdg\u002Fwith-s3-example.html",{"text":59,"link":60},"Blog Series: Building scalable serverless applications with Amazon S3 and AWS Lambda.","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fbuilding-scalable-serverless-applications-with-amazon-s3-and-aws-lambda\u002F",{"text":62,"link":63},"Serverless Framework documentation","https:\u002F\u002Fwww.serverless.com\u002Fframework\u002Fdocs","patterns\u002Flambda-sfn-sls",{"headline":66,"text":67},"Testing",[68,69],"Run the following Lambda CLI invoke command to invoke the function. Note, you must edit the {LambdaProxyArn} placeholder with the ARN of the deployed Lambda function. This is provided in the stack outputs.","\u003Ccode>aws lambda invoke --function-name {LambdaProxyArn} --invocation-type Event --payload '{ \"IsHelloWorldExample\": \"Hello\" }' response.json --cli-binary-format raw-in-base64-out\u003C\u002Fcode>","M-E2Kfp47G0Xcoyuki0KQlR_Znyyip_Cu5gRWAGYR9A",1778846886572]