Coconote
AI notes
AI voice & video notes
Try for free
📋
Amazon SWF in AWS
Jul 17, 2024
Amazon SWF in AWS
Introduction
Amazon SWF
: Simple Workflow Service
Provides programming model and infrastructure for coordinating distributed components and maintaining their execution state
Offers task-based API for easy coordination of work across distributed application components
Accessible via simple API calls from any language
Can be run on EC2 instances or any internet-connected machine
Focuses on the application aspects that differentiate it
Key Concepts
Workflow
Definition
: A set of activities to achieve an objective
Workflow History
: Complete and consistent record of each event since the workflow execution started, maintained by SWF
Application Workflow
Requires several processing steps via executable code, API calls, scripts, or human action
SWF manages dependencies, scheduling, load distribution, and other task associations
Example: E-commerce Order Process
Customer places an order
Order verified by team (e.g., Flipkart, Amazon)
Approval triggers payment options (net banking, credit card, etc.)
User inputs payment details, order placed
Warehouse notified to ship the product
Delivery notification sent to customer
Order completion recorded in database
Creating SWF in AWS
Steps
Log in to AWS account
Go to Services -> SWF or search for Simple Workflow Service
Choose to create a domain or launch a sample workflow
Sample Workflow Creation
:
Domain registration
Activity steps deployment
Run an execution
Publish
Detailed Process
:
Enter domain name and register
Activities registered (CPR transfer, grayscale upload, S3 upload)
Deploy product on EC2 if required
Acknowledge and continue through steps
Finalize instance creation
Benefits and Features of SWF
Scalability
Auto-scales resources with application usage
No manual administration required
Reliability
Runs in Amazon's highly available data centers
Tracks tasks and sends them to application components
Logical Separation
Separates control flow and business logic
Easy to manage and scale according to business changes
Simplicity
Replaces old workflow automation complexities
Developers focus on unique application functionality
Flexibility
Modify application components and logic in any programming language
Run within the cloud or on-premises
Recap
Definition and components of SWF
Example of SWF in e-commerce order process
Steps to create SWF in AWS
Benefits and features of SWF
📄
Full transcript