Skip to content

Sample AWS Cloud Development Kit (CDK) code for accessing S3 data from AWS Batch tasks using an AWS FSx for Lustre filesystem.

License

Notifications You must be signed in to change notification settings

aws-samples/aws-cdk-fsx-lustre-batch-mount

aws-cdk-fsx-lustre-batch-mount

This AWS Cloud Development Kit (CDK) project deploys an AWS FSx for Lustre filesystem and mounts it on AWS Batch tasks to access S3 data from batch workloads with a shared storage.

This project builds the solution as described in the AWS Storage blog: Automatically import Amazon S3 object updates into Amazon FSx for Lustre and combines it with this Knowledge Center article to integrate it with AWS Batch.

Architecture

architecture

This CDK project creates an S3 bucket with dummy content and deploys an FSx for Lustre filesystem into a new VPC, as well as AWS Batch resources to run a sample job. The project includes the following stacks:

  • NetworkingStack: deploys a VPC with a public subnet, a private subnet, and a NAT Gateway.
  • FSxStack: deploys the FSx for Lustre filesystem into the VPC and creates an S3 bucket with a few objects for testing.
  • BatchStack: creates a Launch Template that mounts the FSx filesystem, a Compute Environment that leverages this Launch Template, a job queue that points to the Compute Environment, and a Job Definition that mounts the filesystem into a volume on the container.

Deploying the stacks

Since all three stacks depend on each other, deploying BatchStack will also deploy the other stacks:

cdk -f --require-approval never deploy BatchStack

Cleanup

cdk destroy --all

References

This project implements the solutions described in the following articles:

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

Sample AWS Cloud Development Kit (CDK) code for accessing S3 data from AWS Batch tasks using an AWS FSx for Lustre filesystem.

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks