This repository documents how to create an AWS SageMaker HyperPod cluster that connects to an existing FSx for ONTAP file system.
- AWS CLI installed and configured
- Appropriate IAM permissions to create SageMaker HyperPod clusters
- An existing FSx for ONTAP file system
- An Amazon S3 bucket to store the lifecycle configuration script
This solution connects a SageMaker HyperPod cluster to:
- An existing FSx for ONTAP file system
- Using the same VPC and subnet as the FSx for ONTAP
- With VPC endpoints for secure network connectivity
To ensure connectivity to your HyperPod cluster, you must create these VPC endpoints in the same VPC as your FSx for ONTAP:
# Create an S3 Gateway endpoint for script access
aws ec2 create-vpc-endpoint \
--vpc-id YOUR_VPC_ID \
--service-name com.amazonaws.YOUR_REGION.s3 \
--vpc-endpoint-type Gateway \
--route-table-ids YOUR_ROUTE_TABLE_ID
# Create an SSM Messages Interface endpoint for session connectivity
aws ec2 create-vpc-endpoint \
--vpc-id YOUR_VPC_ID \
--service-name com.amazonaws.YOUR_REGION.ssmmessages \
--vpc-endpoint-type Interface \
--subnet-ids YOUR_SUBNET_IDS \
--security-group-ids YOUR_SECURITY_GROUP_IDNote: Without these VPC endpoints, you won't be able to connect to your HyperPod cluster or access your S3-hosted scripts.
Create a file named fsx-ontap-mount.sh with the following content,
The shell script can be found at the following location:
aws s3 cp fsx-ontap-mount.sh s3://YOUR_BUCKET_NAME/scripts/Important: Use the same VPC, subnet(s), and security groups as your FSx for ONTAP file system.
Once the VPC endpoints are properly configured, you can connect directly using:
aws ssm start-session \
--target s