- Provides persistence for Workflow Core using DynamoDB.
- Provides Queueing support on Workflow Core using AWS Simple Queue Service.
- Provides Distributed locking support on Workflow Core using DynamoDB.
- Provides event hub support on Workflow Core backed by AWS Kinesis.
This makes it possible to have a cluster of nodes processing your workflows.
Install the NuGet package "WorkflowCore.Providers.AWS"
PM> Install-Package WorkflowCore.Providers.AWS
Use the IServiceCollection
extension methods when building your service provider
- .UseAwsDynamoPersistence
- .UseAwsSimpleQueueService
- .UseAwsDynamoLocking
services.AddWorkflow(cfg =>
{
cfg.UseAwsDynamoPersistence(new EnvironmentVariablesAWSCredentials(), new AmazonDynamoDBConfig() { RegionEndpoint = RegionEndpoint.USWest2 }, "table-prefix");
cfg.UseAwsDynamoLocking(new EnvironmentVariablesAWSCredentials(), new AmazonDynamoDBConfig() { RegionEndpoint = RegionEndpoint.USWest2 }, "workflow-core-locks");
cfg.UseAwsSimpleQueueService(new EnvironmentVariablesAWSCredentials(), new AmazonSQSConfig() { RegionEndpoint = RegionEndpoint.USWest2 });
});
If any AWS resources do not exists, they will be automatcially created. By default, all DynamoDB tables and indexes will be provisioned with a throughput of 1, you can modify these values from the AWS console. You may also specify a prefix for the dynamo table names.
Use the the .UseAwsKinesis
extension method on IServiceCollection
when building your service provider
services.AddWorkflow(cfg =>
{
cfg.UseAwsKinesis(new EnvironmentVariablesAWSCredentials(), RegionEndpoint.USWest2, "app-name", "stream-name");
});
The Kinesis provider will also create a DynamoDB table to track the postion in each shard of the Kinesis stream. A shard position will be tracked for each app name that you connect with.