AWS SWF vs Lambda + step functions? Simple answer is use Lambda for all new applications.

Image result for lambda


I do like my Lamb (daaaa)!


What's the difference between SWF and Lambda + step functions?

Well, for a start they can be used together.

Benefits and Limitations of using Lambda Tasks

There are a number of benefits of using Lambda tasks in place of a traditional Amazon SWF activity:
  • Lambda tasks don’t need to be registered or versioned like Amazon SWF activity types.
  • You can use any existing Lambda functions that you've already defined in your workflows.
  • Lambda functions are called directly by Amazon SWF; there is no need for you to implement a worker program to execute them as you must do with traditional activities.
  • Lambda provides you with metrics and logs for tracking and analyzing your function executions.
There are also a number of limitations regarding Lambda tasks that you should be aware of:
  • Lambda tasks can only be run in AWS regions that provide support for Lambda. See Lambda Regions and Endpoints in the Amazon Web Services General Reference for details about the currently-supported regions for Lambda.
  • Lambda tasks are currently supported only by the base SWF HTTP API and in the AWS Flow Framework for Java. There is currently no support for Lambda tasks in the AWS Flow Framework for Ruby.



SWF is much more complicated and is designed for longer processes, with multiple steps, that may take days to complete. For SWF I generally think of use cases like a customer placing an order on a website triggering a workflow that takes the order through all the steps of the process of billing, manufacturing, packaging, shipping, etc.


But doesn't Lambda have it's own workflow thingy? Yes, step functions.
There appear to be some significant limitations however, including throughput and constraints on event-driven behaviour.


SFN state machines have already demonstrated improvement over our old SWF solution in the following areas:
  • Latency. One of our workflows with several short deployment steps took thirty minutes to run under the old system. It takes — no kidding — thirty seconds to run to completion on SFN.
  • Cost. No SWF decider means no Lambda functions treated like persistent compute, which radically lowers cost. Moreover, the state machine structure of SFN means no calls to a DynamoDB state table.
  • Runtime State. The state machine seamlessly transfers the minimal amount of data needed between lambda functions, eliminating the need for other logs or database tables to hold runtime state.
  • Retries/Error Handling. SFN retries failed executions and easily reroutes errors.
  • Debugging. Visual workflows help quickly pinpoint solutions to state machine problems.
  • Code Maintainability. Our codebase has now been completely refactored to take advantage of SFN’s better abstractions and streamlined requirements. I think there’s about half as much code as there was before.


Step Functions is a massive improvement over SWF. As the author said, there are major differences and areas for improvement. Lifecycle management of state machines is pretty poor, especially considering that deleting state machines is hit-or-miss. You'll need to version your state machines yourself--which is still less painful than SWF versioning. Also, because there are no "domains" as in SWF, development can be more of a pain. The last SWF feature that would let me drop SWF completely would be signaling ("sleeping" a workflow until an event occurs).




And the Amazon explanation. It looks like SWF has been deprecated:


Q: When should I use AWS Step Functions vs Amazon Simple Workflow Service (SWF)?
You should consider using AWS Step Functions for all your new applications, since it provides a more productive and agile approach to coordinating application components using visual workflows. If you require external signals to intervene in your processes, or you would like to launch child processes that return a result to a parent, then you should consider Amazon Simple Workflow Service (SWF). With Amazon SWF, instead of writing state machines in declarative JSON, you write a decider program to separate activity steps from decision steps. This provides you complete control over your orchestration logic, but increases the complexity of developing applications. You may write decider programs in the programming language of your choice, or you may use the Flow framework to use programming constructs that structure asynchronous interactions for you.
Q: What will happen to the existing Amazon Simple Workflow Service (SWF)?
AWS will continue to provide Amazon Simple Workflow (SWF) and to support all Amazon SWF customers.
Q: How does AWS Step Functions work with other AWS services?
AWS Step Functions works with several other AWS services, including AWS CloudFormation, AWS Lambda, Amazon EC2, Amazon EC2 Container Service (ECS), Amazon API Gateway, Amazon CloudWatch, AWS CloudTrail, and Auto Scaling.
The following are examples of some things you can do using various AWS services:
  • Launch multiple related resources required for AWS Step Functions state machines and activities using AWS CloudFormation.
  • Implement tasks using Lambda functions or programs running on EC2 or in ECS containers.
  • Associate your Step Functions APIs with methods in an API Gateway API.
  • Scale your EC2 task fleet for AWS Step Functions activities in response to CloudWatch metrics.



Why is SWF in the solution architecture certification? Looks like it SHOULD NOT BE given their advice to use Lambda Step Functions for new applications.

And the other missing major service is API Gateway which is a major new service:

Q: How does AWS Step Functions work with Amazon API Gateway?
Amazon API Gateway is a fully-managed service that makes it easy for developers to publish, maintain, monitor, and secure APIs at any scale. With just a few clicks in the AWS Management Console, you can associate your Step Functions APIs with methods in your API Gateway API, so that, when an HTTPS request is sent to an API method that you defined, API Gateway invokes your Step Functions API actions.
You can use an Amazon API Gateway API to start Step Functions state machines that coordinate the components of a distributed backend application. You can also integrate human activity tasks into the steps of your application, such as an approval requests and responses. You can even make serverless asynchronous calls to the APIs of services that your application uses.
Amazon API Gateway handles all of the tasks involved in accepting and processing hundreds of thousands of concurrent API calls, including traffic management, authorization and access control, monitoring, and API version management.



Comments

  1. Needed to compose you a very little word to thank you yet again regarding the nice suggestions you’ve contributed here.
    "Java Training in Marathahalli"

    ReplyDelete
  2. Those guidelines additionally worked to become a good way to
    recognize that other people online have the identical fervor like mine
    to grasp great deal more around this condition.


    AWS Training in Bangalore


    AWS Training in Bangalore

    ReplyDelete
  3. It has been simply incredibly generous with you to provide openly what exactly many individuals would’ve marketed for an eBook to end up making some cash for their end, primarily given that you could have tried it in the event you wanted.

    Data Science Training in Bangalore

    ReplyDelete
  4. Nice Article on Amazon web services please keep Sharing. For More

    Info please follow our aws online training

    ReplyDelete
  5. Very interesting information Jodie, but, I am interested in publishing poetry. Is there another person who can advise me or you do that too? Thank you for responding

    aws training in chennai

    ReplyDelete
  6. Thanks for providing your wonderful information for more updates on AWS Get touch with AWS Online Course Bangalore Get trained and Certified

    ReplyDelete
  7. Nice blog..! I really loved reading through this article. Thanks for sharing such
    a amazing post with us and keep blogging...
    Dot Net online training in bengalore

    ReplyDelete
  8. With the launch of this expertise, it considerably abridged the storage of content material, supply, value of computation, and utility internet hosting. It has a possible of reworking an information middle from a capital-intensive set as much as a variable priced milieu.This is great blog. If you want to know more about this visit here AWS Cloud Certification.

    ReplyDelete
  9. Really very nice blog information for this one and more technical skills are improve,i like that kind of post.
    salesforce Training in Bangalore
    uipath Training in Bangalore
    blueprism Training in Bangalore


    ReplyDelete
  10. Awesome Post!!! I really enjoyed reading this article. It's really a nice experience to read your post. Thanks for sharing.
    Data Science Course
    Data Science Course in Marathahalli

    ReplyDelete

  11. Thank you for taking the time to discuss this informative content with us. I feel happy about the topic that you have shared with us. keep sharing your information regularly for my future reference. This content creates a new hope and inspiration with me. Thanks for sharing article. The way you have stated everything above is quite awesome. Keep blogging like this.
    AWS training in chennai | AWS training in annanagar | AWS training in omr | AWS training in porur | AWS training in tambaram | AWS training in velachery

    ReplyDelete
  12. Good post!Thank you so much for sharing this lovely article.It was so good to read and useful to upgrade my understanding...Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites
    Java training in Chennai

    Java Online training in Chennai

    Java Course in Chennai

    Best JAVA Training Institutes in Chennai

    Java training in Bangalore

    Java training in Hyderabad

    Java Training in Coimbatore

    Java Training

    Java Online Training

    ReplyDelete
  13. A befuddling web diary I visit this blog, it's incredibly grand. Strangely, in this present blog's substance made motivation behind fact and sensible. The substance of information is instructive



    angular js training in chennai

    angular training in chennai

    angular js online training in chennai

    angular js training in bangalore

    angular js training in hyderabad

    angular js training in coimbatore

    angular js training

    angular js online training

    ReplyDelete
  14. Thanks for Sharing This Article.It is very so much valuable content. I hope these Commenting lists will help to my website.Good content. The explanation of content explained very neat. Thanks for given information about above Article all the details
    are very useful.
    DevOps Training in Chennai

    DevOps Online Training in Chennai

    DevOps Training in Bangalore

    DevOps Training in Hyderabad

    DevOps Training in Coimbatore

    DevOps Training

    DevOps Online Training

    ReplyDelete
  15. Awesome post with lots of data and I have bookmarked this page for my reference. Share more ideas frequently. oracle training in chennai

    ReplyDelete
  16. Great blog.you put Good stuff.All the topics were explained briefly.so quickly understand for me.I am waiting for your next fantastic blog.Thanks for sharing.Any coures related details learn...

    IELTS Coaching in chennai

    German Classes in Chennai

    GRE Coaching Classes in Chennai

    TOEFL Coaching in Chennai

    spoken english classes in chennai | Communication training


    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. Thank you for sharing wonderful information with us.Really useful for everyone data scientist courses

    ReplyDelete
  19. Thank you for sharing wonderful information with us.Really useful for everyonedata scientist courses

    ReplyDelete

  20. I have bookmarked your website because this site contains valuable information in it. I am really happy with articles quality and presentation. Thanks a lot for keeping great stuff. I am very much thankful for this site.
    artificial intelligence course in bangalore

    ReplyDelete
  21. wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i’m a bit clear. I’ve bookmark your site and also add rss. keep us updated.
    data science course in hyderabad with placements

    ReplyDelete
  22. Cognex offer AWS Training and certification in Chennai. And also cognex offers various courses according to the students requirements. Offering both online and offline classes.

    ReplyDelete
  23. We are tied directly into the sate’s renewal database which allows us to process your request almost instantly. data scientist certification

    ReplyDelete
  24. Learn Oracle DBA for making your career towards a sky-high with Infycle Technologies. Infycle Technologies provides the top Oracle DBA Training in Chennai and offering programs in Oracle such as Oracle PL/SQL, Oracle Programming, etc., in the 200% hands-on practical training with professional specialists in the field. In addition to that, the interviews will be arranged for the candidates to set their careers without any struggle. Of all that, Cen percent placement assurance will be given here. To have the best job for your life, call 7502633633 to Infycle Technologies and grab a free demo to know more.
    No.1 Oracle DBA Training in Chennai | Infycle Technologies

    ReplyDelete
  25. This is very informative and intersting for those who are interested in blogging field.

    ReplyDelete
  26. Want to change your career in Selenium? Red Prism Group is one of the best training coaching for Selenium in Noida. Now start your career for Selenium Automation with Red Prism Group. Join training institute for selenium in noida.

    ReplyDelete
  27. Nice blog. Informative and knowledgeable content. Big thumbs up for this blog. I really enjoyed this blog. Thank you for sharing with us.
    Data Science Course Training in Hyderabad with Placements

    ReplyDelete
  28. Learn to build powerful models to solve business problems by generating useful insights and discover the various scientific processes and methods used to transform the information available in huge datasets into meaningful results. master all the tools and techniques in Data Science and gain domain-specific knowledge which will help you to add more value to your profile. Sign up for the Data Science course in Bangalore with Placements and multiple your chances of working across all industries and job functions.data analytics courses in hyderabad

    ReplyDelete
  29. This comment has been removed by the author.

    ReplyDelete

Post a Comment

Popular posts from this blog

Which Amazon Web Services are Interoperable?

AWS Certification glossary quiz: IAM