Replicate FSx-OpenZFS volumes across file systems

Amazon EventBridge Scheduler → AWS Lambda → Amazon FSx-OpenZFS

Periodic FSx-OpenZFS volume replication across file systems using Amazon EventBridge Scheduler and AWS Lambda

The AWS SAM template deploys an Amazon EventBridge Scheduler rule to trigger an AWS Lambda function based on a user schedule to copy the snapshot of the volume and copy them to the target FSx system. The template contains a sample Lambda function that receives the user input for source and target VolumeId. The Lambda function creates snapshots of the source FSx VolumeID and replicates them by performing copy_snapshot_and_update_volume call to the target VolumeId in same account and same region. Notify users using a SNS topic for any errors and snapshot creation details.
This pattern sets up the following resources:
An Amazon EventBridge Scheduler rule that triggers a Lambda function based on the schedule defined by the customer to take snapshots of the provided FSx VolumeID.
An SNS topic that notifies for any failures while creating snapshots.
The function also deletes the older snapshots.
A sample Lambda functions that creates snapshots of the source FSx VolumeID and replicates them by performing copy_snapshot_and_update_volume call to the target VolumeId in same account and same region.

< Back to all patterns

GitHub icon Download this pattern (.zip)

GitHub icon View this pattern on GitHub


Clone repo

git clone https://github.com/aws-samples/serverless-patterns/cd serverless-patterns/eventbridge-lambda-fsx-openzfs-periodic-replication

Deploy

sam deploy


Testing

See the GitHub repo for detailed testing instructions.

Cleanup

Delete the stack: sam delete.

Created by:

Abha Tripathi

Abha Tripathi

Cloud Engineer @ AWS

Follow on LinkedIn

Anup Rajpara

Anup Rajpara

Anup is passionate about serverless & event-driven architectures.

Follow on LinkedIn

Sahil Malhotra

Sahil Malhotra

Serverless enthusiast

Follow on LinkedIn