Skip to content

Latest commit

 

History

History
79 lines (71 loc) · 2.95 KB

mlflow-s3.md

File metadata and controls

79 lines (71 loc) · 2.95 KB

MLflow with S3:

AWS S3 Bucket Setup:

  • Create an AWS S3 bucket

  • Create an AWS IAM Role, with the following policy.

    Note: Replace the BUKET_NAME with your bucket name.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "s3:PutObject",
                "s3:GetObjectAcl",
                "s3:GetObject",
                "s3:DeleteObjectVersion",
                "s3:ListBucket",
                "s3:DeleteObject",
                "s3:PutObjectAcl",
                "s3:GetObjectVersion"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET_NAME",
                "arn:aws:s3:::BUCKET_NAME/*",
            ]
        }
    ]
}
  • Attach the created role to the s3 bucket under permissions.

Note: Replace the BUKET_NAME, ACCOUNT_NUMBER, ROLE_NAME with your S3 bucket name, AWS account ID, and the AWS role name.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "AddCannedAcl",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::ACCOUNT_ID:role/ROLE_NAME>"
            },
            "Action": [
                "s3:PutObject",
                "s3:GetObjectAcl",
                "s3:GetObject",
                "s3:DeleteObjectVersion",
                "s3:ListBucket",
                "s3:DeleteObject",
                "s3:PutObjectAcl",
                "s3:GetObjectVersion"
            ],
            "Resource": [
                "arn:aws:s3:::BUCKET_NAME",
                "arn:aws:s3:::BUCKET_NAME/*"
            ]
        }
    ]
}
  • Create an AWS IAM User for the role created, by adding the role under permissions.

MLflow Server Setup:

Training Workflow Setup

  • Replace the <MLFLOW_S3_ROLE_ARN> under annotations in numalogic-training-workflow-template.yaml

Once you made all the above changes, run the below command:

  kustomize build numalogic-prometheus/manifests/ | kubectl apply -f -