metaflow-tools

Using This Template


Overview

This CloudFormation template deploys all the necessary infrastucture in AWS to support Metaflow’s integration points and extend its capabilities into the Cloud. A brief snapshot of its components are as follows:

Prerequisites

  1. Adequate permissions to deploy all CloudFormation resources within an AWS account.

How To Deploy from the AWS Console

  1. Navigate to “Services” and select “CloudFormation” under the “Management and Governance” heading (or search for it in the search bar).
  2. Click “Create stack” and select “With new resources (standard)”.
  3. Ensure “Template is ready” remains selected, choose “Upload a template file”, and click “Choose file”.
  4. Feel free to explore with “View in Designer” if you so choose, otherwise click “Next”.
  5. Name your stack, select your parameters, and click “Next”, noting that if you enable “APIBasicAuth” and/or “CustomRole”, further configuration will be required after deployment. More info below.
  6. If desired, feel free to tag your stack in whatever way best fits your organization. When finished, click “Next”.
  7. Ensure you select the check box next to “I acknowledge that AWS CloudFormation might create IAM resources.” and click “Create stack”.
  8. Wait roughly 10-15 minutes for deployment to complete. The Stack status will eventually change to “CREATE_COMPLETE”.

Once complete, you’ll find an “Outputs” tab that contains values for the components generated by this CloudFormation template. Those values correlate to respective environment variables (listed next to the outputs) you’ll set to enable cloud features within Metaflow.

Additional Configuration

Did you choose to enable “APIBasicAuth” and/or “CustomRole” and are wondering how they work? Then you’re in the right place! Below are some details on what happens when those features are enabled and how to make use of them.

Optional Metaflow User Interface (EnableUI)

Please note: This section can be ignored if EnableUI is set to false (this is the default value).

This template deploys the UI with authentication using Amazon Cognito. For Cognito to work, you’ll need to provide a DNS name and SSL certificate from AWS ACM. That means you’ll need a few additional steps if using the UI:

  1. Figure out what DNS name to use, that you have control of. You can either register a new domain name, or create a subdomain.
  2. Generate and verify a SSL certificate valid for that name using AWS ACM. Follow the instructions from AWS for this.
  3. Deploy this Cloudformation template. You’ll need to set EnableUI to “true”, and in addition to this:
    • set PublicDomainName to the domain name you chose
    • set CertificateArn to the certificate ARN from step 2 above
  4. After Cloudformation template is deployed, make note of LoadBalancerUIDNSName output value. You’ll need to modify DNS settings to point your domain name to that name.
    • If you’re using Route53, create an A record that is an Alias and choose the load balancer from the drop down.
    • If using a different DNS management tool/registrar, create a CNAME record that points to LoadBalancerUIDNSName
  5. After DNS changes propagate, you should be able to navigate to the DNS name in your browser and see a login prompt. To create a user, go to AWS Console -> Cognito -> User Pools, find the pool that corresponds to this stack and create a new user under “Users and Groups”.